View Single Post
Old 09-07-2014, 04:40 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by eschwartz View Post
The dot plus will match all text including tags, thus matching everything frkm the opening of the first tag to the closing of the last tag.

Use:
[CODE]<[^<>]*>[CODE]
to restrict the match using a set which excludes tag opening and closing brackets.
The dot+? will match up to the first >, not the last one.

And neither pattern will work for something like
Code:
<a href="...", alt="demonstrate that a > b">foo</a>
Yes, it will work if you use entities, but not everyone does.
chaley is offline   Reply With Quote