in reply to Regex to "wrap" a <span around an image.

I assume your question is, "given an IMAGE element (tag) in an HTML document, how do I put it inside a SPAN element". I'll just ignore the fact you want to do it with a regexp, and suggest you use one of the various HTML parsing modules on CPAN. Given an HTML parser, modifying a document should be easy.
  • Comment on Re: Regex to "wrap" a <span around an image.

Replies are listed 'Best First'.
Re^2: Regex to "wrap" a <span around an image.
by ultranerds (Hermit) on Nov 27, 2008 at 13:19 UTC
    Hi,

    Yeah, thats pretty much the jist of it :) (its really just so we can assign classes to "spans", so we can make them look nice =))

    Any suggestions as to the perl modules?

    TIA

    Andy