# Regular expressions with replace

**URL:** <https://forums.toadworld.com/t/regular-expressions-with-replace/31470>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [October 31, 2014, 7:53am UTC](https://forums.toadworld.com/t/regular-expressions-with-replace/31470 "2014-10-31T07:53:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bartron](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@Bartron](https://forums.toadworld.com/u/Bartron)\
**Post date:** [October 31, 2014, 7:53am UTC](https://forums.toadworld.com/t/regular-expressions-with-replace/31470/1 "2014-10-31T07:53:04Z")

</div>

Not the best with regular expressions, but fair. Trying to find all the occurances that start with “Hi there '” (the words Hi there followed by a single qoute) and end with “old buddy old pal’” (the words BLAH followed a single qoute.

what I am trying is (underbars are just for clarity) _Hi there ‘.\*old buddy old pal’_ but it is not finding the string. I also tried .+ instead of .\*. Is it me or is it Toad? (I am running 9.25, which has some other known issues)

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [October 31, 2014, 8:07am UTC](https://forums.toadworld.com/t/regular-expressions-with-replace/31470/2 "2014-10-31T08:07:31Z")

</div>

That's not a valid version of Toad. At any rate, Toad 9.x versions had poor regular expression support. I'm unable to get anything to work with your example in 9.0. If you could upgrade to 12.6 which uses the PCRE regex engine this would work assuming "Hi"  
"there" "old" and "pal" are expected to be whole words. It also spans lines so remove the (?s) if single line support is needed. (?s)\bHi there\b.\*?\bold buddy old pal\b

On 10/31/2014 10:53 AM, Bartron wrote:

> **[Regular expressions with replace](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx)**

> Thread created by Bartron  
> Not the best with regular expressions, but fair. Trying to find all the occurances that start with "Hi there '" (the words Hi there followed by a single qoute) and end with "old buddy old pal'" (the words BLAH followed a single qoute.

> what I am trying is )underbars are just for clarity) _Hi there '.\*old buddy old pal'_ but it is not finding the string. I also tried .+ instead of .\*. Is it me or is it Toad? (I am running 9.25, which has some other known issues)

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx?subscribe=false) on this subject.
> 
> Or [  
> Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx?AbuseContentId=b603d214-c586-4279-9ab2-9f1dea49d13c&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true)  
> this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

---

<div class="post-metadata">

**Author:** ![Bartron](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@Bartron](https://forums.toadworld.com/u/Bartron)\
**Post date:** [October 31, 2014, 8:18am UTC](https://forums.toadworld.com/t/regular-expressions-with-replace/31470/3 "2014-10-31T08:18:30Z")

</div>

Sorry. My bad memory. 9.7.2.5 is my version. (At first I thought you were talking about the version of Toad I was using was bad, not that I had given incorrect  
numbers J )

Upgrade has been long sought after.

**From:** Michael Staszewski [[mailto:bounce-mstaszew@toadworld.com](mailto:bounce-mstaszew@toadworld.com)]

**Sent:** Friday, October 31, 2014 10:08 AM

**To:** [toadoracle@toadworld.com](mailto:toadoracle@toadworld.com)

**Subject:** Re: [Toad for Oracle - Discussion Forum] Regular expressions with replace

**[Re: Regular expressions with replace](http://www.toadworld.com/products/toad-for-oracle/f/10/p/23102/49866.aspx#49866)**

Reply by Michael Staszewski

That's not a valid version of Toad. At any rate, Toad 9.x versions had poor regular expression support. I'm unable to get anything to work with  
your example in 9.0. If you could upgrade to 12.6 which uses the PCRE regex engine this would work assuming "Hi" "there" "old" and "pal" are expected to be whole words. It also spans lines so remove the (?s) if single line support is needed. (?s)\bHi there\b.\*?\bold  
buddy old pal\b

On 10/31/2014 10:53 AM, Bartron wrote:

> **[Regular expressions with replace](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx)**

> Thread created by Bartron

> Not the best with regular expressions, but fair. Trying to find all the occurances that start with "Hi there '" (the words Hi there followed by a single qoute) and end with "old buddy old pal'"  
> (the words BLAH followed a single qoute.

> what I am trying is )underbars are just for clarity) _Hi there '.\*old buddy old pal'_ but it is not finding the string. I also tried .+ instead of .\*. Is it me or is it Toad? (I am running  
> 9.25, which has some other known issues)

> To reply, please reply-all to this email.
> 
> [Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx?subscribe=false) on this subject.
> 
> Or [  
> Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.
> 
> Toad for Oracle - Discussion Forum

> [Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx?AbuseContentId=b603d214-c586-4279-9ab2-9f1dea49d13c&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true)  
> this post as spam/abuse.

> ![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/toad-for-oracle/f/10/t/23102.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - General](http://www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](http://www.toadworld.com/products/toad-for-oracle/f/10/p/23102/49866.aspx?AbuseContentId=0ea74344-017e-4e11-8216-4833545a59f7&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](https://global.discourse-cdn.com/quest/original/3X/5/0/50b30fd5f87c85fe5cba2635cb83316ca71250d7.gif)
