Regex: Search and replace left side = to right side
Posted
by ctrlShiftBryan
on Stack Overflow
See other posts from Stack Overflow
or by ctrlShiftBryan
Published on 2010-03-08T22:17:08Z
Indexed on
2010/03/08
22:21 UTC
Read the original article
Hit count: 458
regex
|search-and-replace
How do I use regular expressions and search and replace to turn this
[UserID] = <UserID, int,>
[UserID] = 123123
[UserID] = asd123123
into
[UserID] = [UserID]
[UserID] = [UserID]
[UserID] = [UserID]
In other words I want to take everything from left side of the line up to the '=' character and replace everything on the right side of the '=' with the match from the left side. We can assume a line break at the end of each line.
What are my Find what: and Replace with: values?
© Stack Overflow or respective owner