Regular Expressions 101

Community Patterns

Negative regex for block of text

1

Regular Expression
ECMAScript (JavaScript)

/
^(?![\S\s]*should not exist)
/
i

Description

This will make sure a certain regex does not exist in a block of text, that includes new lines

Submitted by Mandeep Rai - 8 years ago