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 » Mon Jan 31, 2005 5:32 pm

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 » Mon Jan 31, 2005 5:32 pm

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

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

Post by Abacre » Mon Jan 31, 2005 5:32 pm

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 » Mon Jan 31, 2005 5:32 pm

Not yet, hope I will know :D

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests