Replace (.+)="(.+)"
with
$1="{resourceManager.getString('trad', '$2')}"
The sub-strings captured by ()
can be accessed using $1
, $2
(in the same order as they appear in the regex) etc from the replacement string. As shown in Paul's answer, some regex flavors (Perl, Python etc) follow \1
, \2
syntax instead of $1
, $2
.
What is the language - it looks like you are trying to do it from Flex Builder. In that case, use $1
syntax in the replace text area. If you want to change only text and no other attributes, use:
text="(.+)"
in the find area and
text="{resourceManager.getString('trad', '$1')}"
in the replace area.
To answer the comment: search for the following instead.
text="(\w+)"
This allows only alphanumeric chars and under scores in the value of text attribute. Thus stuff with {.(', etc will not match and hence won't be replaced.