JavaScript RegExp Object
The [abc] expression is used to find any character between the brackets.
The characters inside the brackets can be any characters or span of characters.
![]()
The [abc] expression is supported in all major browsers.
Do a global search for the character-span [a-h] in a string:
The marked text below shows where the expression gets a match:
JavaScript RegExp Object
Your message has been sent to W3Schools.