Toad World® Forums

Regular expressions with replace

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)

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

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 on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

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]

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

To: toadoracle@toadworld.com

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

Re: Regular expressions with replace

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

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 on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.