Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

<font> to <span>

  •  07-08-2010, 5:05 PM

    <font> to <span>

    I want to change a font element to an XHTML compatible variant.

    e.g.

    find

    <font face="arial" size="1" color="red" >hello world</font>

    replace

    <span style='font-family: arial; font-size: 1; color: red;'>hello world</span>

     

    note:
    - the font attributes can change order
    - the font attributes can have e.g. only a title attribute

     

    Can you guys help me out with a nice regexp pattern?

    thanks
    Filed under: , , , , , ,
View Complete Thread