Page 1 of 1

Literal and wildcard replace

Posted: Thu Aug 09, 2012 3:34 pm
by eezarfs
I'm a newbie...

I'm attempting to find literal text followed by varying text and need to know the reglar expression.

An example of the text to be replaced:

CAST(0x0000A0A100EE05FC AS DateTime)

where the 0x0000A0A100EE05FC is variable.


I want to replace the 'CAST(' to the closing parenthesis ')' with CURRENT_TIMESTAMP.


Any help is really appreciated.

Posted: Thu Aug 09, 2012 4:33 pm
by ak47wong
If you have POSIX regular expression syntax enabled in Configure > Preferences > Editor as is normally recommended:

Find what: CAST\([^ ]* AS DateTime\)
Replace with: CURRENT_TIMESTAMP

If you don't have POSIX regular expression syntax enabled:

Find what: CAST([^ ]* AS DateTime)
Replace with: CURRENT_TIMESTAMP

Posted: Thu Aug 09, 2012 4:47 pm
by eezarfs
Thanks, works perfectly.