YouTip LogoYouTip

Jsref Regexp Nfollow Not

# JavaScript RegExp ?! Quantifier [![Image 8: RegExp Object Reference Manual](#) JavaScript RegExp Object](#) * * * ## Definition and Usage The ?!_n_ quantifier matches any string that is not followed by the specified string _n_. ## Syntax new RegExp("_regexp_(?!_n)_") or /_regexp_(?!_n)_/ * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The ?! quantifier is supported in all major browsers. * * * ## Example ## Example Perform a global search for "is" that is not followed by "all": var str="Is this all there is"; var patt1=/is(?! all)/gi; The text marked below shows where the expression gets a match: Is this all there is [Try it yourself Β»](#) * * JavaScript RegExp Object](#)
← Jsref Regexp GlobalJsref Regexp Wordchar β†’