Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<garbage>(nowrap="")|(nowrap))(?<styleHead>\sstyle=")(?<styleBody>\w+((\w+)|(-\w+)):\s\w+;)(?<styleTail>")
/

Description

A regex to find all nowrap text occurrences and name all the groups involved in preparation for a replacement pass

Submitted by Joe Hacobian - 12 years ago