Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(<pre[^>]*?>((?:(?!pre>).|\n)*)<\/pre>)
/
gi

Description

No /s, took quite a time to think.

Submitted by Namikaze Ray a.k.a. Pendechosen - 10 years ago