# Search & Replace RegExp replacement not working

**URL:** https://www.finalbuilder.com/forums/t/search-replace-regexp-replacement-not-working/907
**Category:** Discussion
**Created:** [July 24, 2008, 1:50am UTC](https://www.finalbuilder.com/forums/t/search-replace-regexp-replacement-not-working/907 "2008-07-24T01:50:20Z")
**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, 2008, 1:50am UTC](https://www.finalbuilder.com/forums/t/search-replace-regexp-replacement-not-working/907/1 "2008-07-24T01:50:20Z")

</div>

We have a ton of File Copy actions with hard-coded file names (don't ask why). I tried to use "Search & Replace" to do a global replacement for recently renamed files.

Given a file path name that ends like:  
 foo\Ver3MyFile.dll  
I want it make it like:  
 foo\Ver%NEW\_VER%MyFile.dll

I also want to ignore files that have an "F" after the 3 like:  
 foo\Ver3File.dll

So I tried a source of:  
 foo\\Ver3([^F][\w]+)\.dll  
with a replacement of:  
 foo\\Ver%NEW\_VER%$1.dll

What I got was:  
 foo\Ver%NEW\_VER%$1.dll

It doesn't do what the FB5 help calls "sub-expression" replacement. What's wrong?

FYI: We use FB5.5.

Thanks - Michael

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [July 24, 2008, 3:45am UTC](https://www.finalbuilder.com/forums/t/search-replace-regexp-replacement-not-working/907/2 "2008-07-24T03:45:48Z")

</div>

Hi Michael,   
  
 The sub-expression replace is actually a FinalBuilder 6 feature (we accidently had some FB6 topics leak into the FB5 help file a while back).   
  
 I’ve confirmed that the syntax and functionality of your above example does work in FB6.   
  
 cheers,   
 tate.

---

<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, 2008, 7:46am UTC](https://www.finalbuilder.com/forums/t/search-replace-regexp-replacement-not-working/907/3 "2008-07-24T07:46:24Z")

</div>

Thanks,   
  
 We might be ready to upgrade this summer.
