JavaScript RegExp ?! Quantifier
- Previous Page ?=
- Next Page constructor
- Go Back to Previous Level JavaScript RegExp Reference Manual
Definition and usage
?!n Quantifiers match any string that is not immediately followed by n string.
Tip:Use ?=n Quantifiers to match any string that immediately follows n string.
Example
Search globally for "is" without case sensitivity, not immediately followed by "all":
let text = "Is this all there is"; let pattern = /is(?! all)/gi;
Syntax
new RegExp("regexp(?!n)")
Or abbreviated as:
/regexp(?!n)/
Syntax with modifiers
new RegExp("regexp(?!n)", "g")
Or abbreviated as:
/regexp(?!n)/g
Browser supports
/(?!n)/
Ito ay ECMAScript1 (ES1) katangian.
Lahat ng browser ay ganap na sumusuporta sa ES1 (JavaScript 1997):
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Support | Support | Support | Support | Support | Support |
- Previous Page ?=
- Next Page constructor
- Go Back to Previous Level JavaScript RegExp Reference Manual