Hi All,
I am trying to create a macro to select a HTML tag. E.g. if I select the first "a" and run the macro with this text:
the whole tag (including angle brackets) will be selected.
I am aware that macros can't loop, so it wouldn't work for selecting the outer span in this situation:
but that's ok - simple case first.. maybe I will invest the time to write a JavaScript to take care of the nested case.
From earlier posts, a regex works:
But you can't put ^s in a regex..
A very poor non regex version is:
But this fails to select the outer angle brackets.
Any suggestions as to how to improve this would be most welcome!
Rob
I am trying to create a macro to select a HTML tag. E.g. if I select the first "a" and run the macro with this text:
Code: Select all
<a href="blah"><b>some text</b></a>
I am aware that macros can't loop, so it wouldn't work for selecting the outer span in this situation:
Code: Select all
<span>some <span>text</span></span>
From earlier posts, a regex works:
Code: Select all
<DIV[^>]*>([^ÿ]*?)</DIV>
A very poor non regex version is:
Code: Select all
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Find Select "</^s"
Any suggestions as to how to improve this would be most welcome!
Rob