in reply to RegEx Against Arbitrary XML Tags
GrandFather's answer is certainly the right way to go, but while we're here, let's look at your regular expression:
if($line =~ /^\s*<(\w+)>[^\w*|\d*|<]/)Breaking it down:
I'm not quite sure what you wanted at the end there, but parens ((...|...)) are probably closer than a character class ([]).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegEx Against Arbitrary XML Tags
by onegative (Scribe) on Oct 20, 2011 at 13:39 UTC | |
by Jenda (Abbot) on Oct 20, 2011 at 14:11 UTC | |
by Anonymous Monk on Oct 20, 2011 at 14:23 UTC |