How can I replace something within some tag for e.g. if I want to replace something within this tag <first> this is a test </first>
I want the output which is <first></first>.
The solution is very simple. First, you have to match an opening tag:
\<tag_name[^\>]#\> where [^\>]# means matching all tag until > is reached
then, match tag inner text:
[^\<]# which means matching all tag inner text until < is reached
and the closing tag:
\<\/tag_name\>
The full search expression with () to store tags:
(\<tag_name[^\>]#\>)[^\<]#(\<\/tag_name\>)
Now, the replace expression:
\1something\2
| © 2002-2006 | This help file was built with |