# Trying to match version number in SQL script with Text Find / Replace

**URL:** https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469
**Category:** Discussion
**Created:** [April 28, 2010, 7:42am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469 "2010-04-28T07:42:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jeremyjarrell](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jeremyjarrell](https://www.finalbuilder.com/forums/u/jeremyjarrell)
#### Post date: [April 28, 2010, 7:42am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/1 "2010-04-28T07:42:06Z")

</div>

Hello all,

I'm using the Text Find / Replace Action to update a version number in a SQL&nbsp;file.&nbsp; The string I'm looking for in the file looks like...

INSERT INTO [dbo].[InstallationHistory] (  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Version]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) VALUES (  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1.4.22.15521'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )

I'm trying to isolate the '1.4.22.15521' value so it can be updated with another value.&nbsp; I'm using a regex match with the pattern

(\d+\.)(\d+\.)(\d+\.)(\d+)

which works find in testing in a text editor.&nbsp; However, when I try to match with this same pattern in the Text Find /&nbsp;Replace Action with the "Match as regular expression" option checked I&nbsp;receive no matches.&nbsp; I understand that Text Find / Replace doesn't support a full regex implementation, am&nbsp;I&nbsp;using something that's not supported?&nbsp;&nbsp;If so, is there another way I can achieve my goal?

&nbsp;

Thanks,

Jeremy

&nbsp;

---

<div class="post-metadata">

### Author: ![robert.wachtel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@robert.wachtel](https://www.finalbuilder.com/forums/u/robert.wachtel)
#### Post date: [April 28, 2010, 7:47am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/2 "2010-04-28T07:47:11Z")

</div>

Have you tried it without the groups?   
  
 [code]\d+.\d+.\d+.\d+[/code]   
  
 (but then maybe you should better include the ’ to your pattern)

---

<div class="post-metadata">

### Author: ![jeremyjarrell](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jeremyjarrell](https://www.finalbuilder.com/forums/u/jeremyjarrell)
#### Post date: [April 28, 2010, 7:52am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/3 "2010-04-28T07:52:22Z")

</div>

Hi Robert,

Thanks for the quick reply.&nbsp; I've just tried the regex without the groups, both with and without the surrounding single quotes.&nbsp; Unfortunately&nbsp;I&nbsp;still found no matches.

Thank you for trying, though.

Jeremy

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [April 28, 2010, 10:55am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/4 "2010-04-28T10:55:49Z")

</div>

Hi Jeremy,   
  
 Please make sure you’ve got the latest official build of FinalBuilder 6 installed as we updated the RegEx library that the action uses to one that is Perl RegEx compatible. Once that’s done you should be able to use the expression:   
  
 (\d+).(\d+).(\d+).(\d+)   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![jeremyjarrell](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jeremyjarrell](https://www.finalbuilder.com/forums/u/jeremyjarrell)
#### Post date: [April 29, 2010, 12:46pm UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/5 "2010-04-29T12:46:27Z")

</div>

Hi Paul,   
  
 Thanks for the response. I’ve updated to the latest build (6.3.0.2026) and tried both your RegEx as well as my original RegEx. Unfortunately I’m still not able to find the version number string in my file.   
  
 I’ve also tried finding simple strings in the file, such as the InstallationHistory string that specifies the table in question, and noticed that I cannot find those either. In fact, I seem unable to find any string in the file at all. Could there be something else preventing the action from correctly loading my file, perhaps if it is in use elsewhere in the system or if it is an unsupported encoding?   
  
 Thanks,   
 Jeremy

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [April 29, 2010, 10:29am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/6 "2010-04-29T10:29:41Z")

</div>

Hi Jeremy,   
  
 Could you please send in the text file and your FinalBuilder project to support [at] [finalbuilder.com](http://finalbuilder.com) and we’ll see if we can work out why it’s not working.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![jeremyjarrell](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jeremyjarrell](https://www.finalbuilder.com/forums/u/jeremyjarrell)
#### Post date: [April 30, 2010, 2:26am UTC](https://www.finalbuilder.com/forums/t/trying-to-match-version-number-in-sql-script-with-text-find-replace/1469/7 "2010-04-30T02:26:20Z")

</div>

Hi Paul,   
  
 I’ve sent the email from jjarrell [at] [matrixformedia.com](http://matrixformedia.com). Thanks for your continued help, I’m looking forward to your response.   
  
 Jeremy
