Hi,
According to the documentation, in the "find & replace" dialog I should be
able to use a regular expression as a replacement string if the "Use:"
checkbox is enabled and "Regular Expressions" is selected.
I'm trying to do the following:
replace the first string with the second string:
mName kName
mValue kValue
mDescription kDescription
I'm using the following regular expressions in the find and replace fields:
find what: "^m.+"
replace with: "^k.+"
Did I miss something?
Thanks
Hua-Ying
Paul Colton - 30 Sep 2005 20:08 GMT
Hua-Ying,
You have to surround the match expression you want to use in your search
string with curly braces (called a "Tag expression"). Then these tag
expressions are referenced in the replace expression by index. "\1" is the
first tag expression, "\2" is the second, and so on.
For example:
find: {.+} eats {.+}
replace: \2 is eaten by \1
cat eats mouse
...becomes...
mouse is eaten by cat
so, for your example
find: ^m{.+}
replace: k\1
Note that you don't need the "^" character (match beginning of line) in the
replace expression
Hope that helps.
-Scott
> Hi,
>
[quoted text clipped - 17 lines]
> Thanks
> Hua-Ying