JavaScript RegExp \xdd meta-character

definition and usage

\xdd Meta-character matching is defined by the hexadecimal number (dd) specified Latin characters.

Example

Perform a global search for the hexadecimal number 57 (W) in the string:

let text = "Visit CodeW3C.com. Hello World!";
let pattern = /\x57/g;

Try it yourself

syntax

new RegExp("\\xdd)

or abbreviated as:

/\xdd/

Syntax with modifiers

new RegExp("\\xdd", "g")

or abbreviated as:

/\xdd/g

browser support

/\xdd/ is ECMAScript1 (ES1) feature.

All browsers fully support ES1 (JavaScript 1997):

Chrome IE Edge Firefox Safari Opera
supported supported supported supported supported supported

Regular expression search methods

In JavaScript, regular expression text search can be completed using different methods.

usagePattern (pattern)As regular expressions, these are the most commonly used methods:

example description
text.match(pattern) string method match()
text.search(pattern) string method search()
pattern.exec(text) RexExp method exec()
pattern.test(text) RexExp method test()