in reply to help match this
:)/<a\s(.*)/s
Honestly, you don't show where it should stop matching, so I can just grab the rest of the string.
I assume that actually, you want to match up to the next "<a", but that's just a guess. As there may not be a next anchor, the latter should be optional, thus, match up to the end of the string. So, try one of:
/<a\s((?:(?!<a\s).)*)/s /<a\s(.*?)(?:<a\s|$)/s
If your "html" is much more complex than this, you should look into using a HTML parser. I've used HTML::TokeParser::Simple with success in similar tasks in the past, so it's my first recommendation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help match this
by Silent-monk (Novice) on Jul 04, 2006 at 12:41 UTC |