# RegEx expression giving error

**URL:** https://www.finalbuilder.com/forums/t/regex-expression-giving-error/536
**Category:** Discussion
**Created:** [July 24, 2007, 9:41am UTC](https://www.finalbuilder.com/forums/t/regex-expression-giving-error/536 "2007-07-24T09:41:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 24, 2007, 9:41am UTC](https://www.finalbuilder.com/forums/t/regex-expression-giving-error/536/1 "2007-07-24T09:41:06Z")

</div>

I need some help.&nbsp; 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](http://www.fileformat.info/tool/regex.htm)

but throws this error from FinalBuilder 4.&nbsp;

Error: An error occured matching the regular expression:

TRegExpr(comp): Urecognized Modifier (pos 12)

Any ideas?

-Matt

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [July 25, 2007, 2:47am UTC](https://www.finalbuilder.com/forums/t/regex-expression-giving-error/536/2 "2007-07-25T02:47:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 25, 2007, 9:58am UTC](https://www.finalbuilder.com/forums/t/regex-expression-giving-error/536/3 "2007-07-25T09:58:45Z")

</div>

Nope, switching to () works just fine.

&nbsp;

Thanks for the help.

-Matt
