in reply to perl html tag editing to uppercase
This unfortuately is not the right approach. You regex will match quite a bit more than you expect.
You should look into a module like HTML::TokeParser.
Now getting back to why your regex wasn't helping:imagine this line of HTML
look at this <<<----- <b>It is really neat</b> I swear >>What will be captured to $3 is
----- <b>It is really neat</b> I swearOne tool to add to your regex arsenal is negated character classes like [^ ]. Rewriting your regex like /<([^>]+)>/ would get you closer, but still is not what you want. You can read more about negated character classes in perlre
Writing a HTML parser with a regex is a somewhat like hammering a nail with a flounder. You should really look for right tool in perl, in this case a true parser is going to help you out a lot.
|
grep> cd /pub grep> more beer |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl html tag editing to uppercase
by Anonymous Monk on Apr 11, 2002 at 08:30 UTC |