http://www.perlmonks.org?node_id=696344


in reply to Re: Editing HTML files
in thread Editing HTML files

Thanks Tanktalus. The problem with XHTML is the files are generated as HTML and get overwritten by another process. The problem with reg expressions is the tag values are unpredictable. I saw the same issue when glancing over the HTML:Manipulator docs. I was hoping I missed something or someone might have seen this tag format before. I'll give HTML::Parser a shot.

Replies are listed 'Best First'.
Re^3: Editing HTML files
by pc88mxer (Vicar) on Jul 08, 2008 at 21:49 UTC
    The problem with reg expressions is the tag values are unpredictable.
    Well, in that case a proper parser is a better approach.
Re^3: Editing HTML files
by Lawliet (Curate) on Jul 08, 2008 at 21:56 UTC

    If the tag values are unpredictable, use metacharacters. Then again, depending on the html files your editing, it may not work

    <(^.^-<) <(-^.^<) <(-^.^-)> (>^.^-)> (>-^.^)>