YouTip LogoYouTip

Jsref Regexp Charset Not

# JavaScript RegExp [^abc] Expression [![Image 8: RegExp Object Reference Manual](#) JavaScript RegExp Object](#) * * * ## Definition and Usage The [^abc] expression is used to find any character that is NOT between the brackets. The characters inside the brackets can be any characters or character ranges. ## Syntax new RegExp("[^xyz]") Or in a simpler way: /[^xyz]/ * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the [^abc] expression. * * * ## Example ## Example Perform a global search for characters NOT in the range : var str="Is this all there is?"; var patt1=/[^a-h]/g; The marked text below shows where the expression gets a match: Is t h is a ll t he r e is? [Try it yourself Β»](#) * * JavaScript RegExp Object](#)
← Jsref Regexp DotJsref Substring β†’