Regular Expressions 101

Community Library

Community Library Entry

0

Regular ExpressionOpen Workspace

/
(?<!\?)\:
/
gm

Description
Created·2019-03-19 09:08
Type·Match
Flavor·PCRE (Legacy)

Matches x only if x is not preceded by y.This is called a negated lookbehind.

For example, /(?<!-)\d+/ matches a number only if it is not preceded by a minus sign. /(?<!-)\d+/.exec('3') matches "3". /(?<!-)\d+/.exec('-3') match is not found because the number is preceded by the minus sign.

Submitted by Anonymous
Open Workspace