Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
<font color="([^"]*)">(.*?)<\/font>
/
gm

Description

This regex fixes <font> tags that contain a color attribute, replacing them with <span> tags containing a style attribute

Submitted by Alecto Irene Perez - 3 years ago