RegEx expression giving error

I need some help.  I'm using this expression to find and replace build numbers like 1.9.2.0, 1.9.2.*, 1.10

(?:[0-9]+|\*)(?:(?:\.(?:[0-9]+|\*)){1,3})

It works fine when testing from http://www.fileformat.info/tool/regex.htm

but throws this error from FinalBuilder 4. 

Error: An error occured matching the regular expression:

TRegExpr(comp): Urecognized Modifier (pos 12)

Any ideas?

-Matt

Hi Matthew,

Unfortunately, the regular expression engine we're using doesn't support non-capturing groups, ie (?:x).

While this is very annoying, there's normally a way to rewrite any regex so it doesn't require them. I'm happy to help you rewrite the expression, if you can be more specific about what you need to match and which groups you need access to in the result.

If you just need to match the entire string, you should be able to just replace all of the (?:) with () and it should just work (albeit fractionally slower.)

Regards,

Angus

Nope, switching to () works just fine.

 

Thanks for the help.

-Matt