christiangalsterer / stash-filehooks-plugin

An Atlassian Stash plugin to check on various file attributes, like size, name
Apache License 2.0
14 stars 27 forks source link

Pattern case insensitivity #10

Closed robouk closed 9 years ago

robouk commented 9 years ago

Can't figure out the pattern expression as it does not appear to be standard regex.

I would expect pattern /\.(mp3|mp4)/gi to affect the following filetypes:

The pattern only affects .mp3 and .mp4. How would a user create a case insensitive pattern?

christiangalsterer commented 9 years ago

The following expression should work: .*(?i)(mp3|mp4)$

(?i) makes the expression on the right hand side case insensitive.