Tutorial
Tools & Languages
Examples
Reference
Matching a Complete Line That Doesn't Match a Regex
^
(
(?!
regexp
)
.
)
*
$
Options: ^ and $ match at line breaks
Assert position at the start of the string or after a line break character
Match the regular expression below and capture its match into backreference number 1
Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Note: You repeated the backreference itself. The backreference will capture only the last iteration. Put the backreference inside a group and repeat that group to capture all iterations.
Assert that it is impossible to match the regex below starting at this position (negative lookahead)
Match the characters "regexp" literally
Match any single character that is not a line break character
Assert position at the end of the string or before a line break character
Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print