Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(trouble(?:(?:\s+)?(?:<.?em.*>(?:\s+)?)?\w+?)?(?:(?:\s+)?(?:<.?em.*>(?:\s+)?)?\w+?)?(?:(?:\s+)?(?:<.?em.*>(?:\s+)?)?\w+?)?(?:\s+)?(?:<.?em.*>)?(?:\s+)?internet)
"
gm

Description

matching a keyword expression and wrapping it with an html tag

Submitted by anonymous - 3 years ago