Change string into the same string in Regular Expression

General discussions about Advanced Find and Replace
Post Reply
qq

Change string into the same string in Regular Expression

Post by qq »

I have to replace internal line of block of texts. They have few same lines but few are different.

Eg.

AAAA
10
xx
20
yy
30
BBBB

where xx, yy are variables.

Want to have at the end

AAAA
10
xx
20
yy
CCCC

I search with expression like:
AAAA\r\n10\r\n.*\r\n20\r\n.*\r\nBBBB\r\n

but have no idea what to put as result expression in places marked by !

AAAA\r\n10\r\n ! \r\n20\r\n ! \r\nCCCC\r\n

qq

Post by qq »

Now I know about () and $1 possibilities.
Thanks :)

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

Yes, you may use () and $1

Do you know about \1 ? :wink:
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

qq

Post by qq »

Not yet, hope I will know :D

Post Reply