Page 1 of 1

How to replace the following text

Posted: Thu Feb 16, 2012 7:39 am
by dave maheshwari
I have a text of format ABCD-1234 appear randomly in the page
I can search all such using the following regular expression
[A-Z][A-Z][A-Z][A-Z]-[0-9][0-9][0-9][0-9]
however i want to replace the same with
My preceding bla bla text ABCD-1234 My ending bla bla text

How do i do that

Thanks

Posted: Thu Feb 16, 2012 9:41 am
by ben_josephs
Use "Posix" regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: [A-Z]{4}-[0-9]{4}
Replace with: My preceding bla bla text \0 My ending bla bla text

[X] Regular expression

Replace All