in search -> (?
in replace -> ${name}
\k --> back reference to a named match
Example:
SearchPattern = (?<tag>bold)>(?<text>[\s\S]+?)</\k<tag>>
ChangePattern = <${tag}><font color=red>${text}</font></${tag}>
ChangePattern = <${tag}><font color=red>${text}</font></${tag}>
Text:
<bold>this text will be red</bold>
Result:
<bold><font color=red>this text will be red</font></bold>
<bold>this text will be red</bold>
Result:
<bold><font color=red>this text will be red</font></bold>
I hope everything is clear in the example :)
No comments:
Post a Comment