JavaScript RegExp [^xyz] Modifier
Complete RegExp Object Reference
Definition and Usage
When the [^xyz] modifier is set the regular expression finds characters that
is not the specific
characters or span of characters.
The characters inside the brackets can be any characters or span of
characters.
Syntax
new RegExp("[^xyz]")
OR
/[^xyz]/
|
Example
In the following code we will do a global search for characters that not in
the "a"
to "h" span:
var str = "Is this all there is?";
var patt1 = new RegExp("[^a-h]","g");
|
The marked text below shows where the RegExp gets a match:
Try-It-Yourself Demos
not charset
How to use the "[^a-h]" modifier to find all occurrences of characters that is not in the characters span "a" to "h".
Complete RegExp Object Reference
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|