I'm sure this is a basic question - I've imported a number of pages from HTM - how do I search for anything that's tagged "<....>" & delete it, bearing in mind that the text within the "<>" brackets varies considerably. I've tried
^<.*>
but this deletes text between tags if there are more than one an a line.
many thanks
search-replace
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Jens Hollmann
Re: search-replace
That is because ".*" matches a sequence of any character including ">" and Textpads regular expressions are "greedy" per default which means it takes the longest match that is found as the result.
So try something like
<[^>]*>
Which will instead match a sequence of any character except ">" between "<" and ">".
Note that your tags mustn't span multiple lines!
HTH
Jens
So try something like
<[^>]*>
Which will instead match a sequence of any character except ">" between "<" and ">".
Note that your tags mustn't span multiple lines!
HTH
Jens
-
Andreas
Re: search-replace
You can't really work on html with regex.
Example:
<img src="dummy.gif" alt="this is an image of an > character" width="bla">
Example:
<img src="dummy.gif" alt="this is an image of an > character" width="bla">
-
Paraic McKenna
Re: search-replace
Many thanks to all for your help - actually, I was able to get the solution under the help function:
<[^>]*>
Lessons to learn:
1) RTFM
2) what a great application
<[^>]*>
Lessons to learn:
1) RTFM
2) what a great application