The EXSLT Regular Expressions package provides functions that allow testing, matching, and replacing text using JavaScript style regular expressions. The namespace for the Regular Expressions package is http://exslt.org/regular-expressions
.
- regexp:match()
regexp:match()
performs regular expression matching on a string, returning the submatches found as a result.- regexp:replace()
regexp:replace()
replaces the portions of a string that match a given regular expression with the contents of another string.- regexp:test()
regexp:test()
tests to see whether a string matches a specified regular expression.
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
regexp:match() | Chrome ? | Edge ? | Firefox Full support 3 | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android Full support 4 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
regexp:replace() | Chrome ? | Edge ? | Firefox Full support 3 | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android Full support 4 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
regexp:test() | Chrome ? | Edge ? | Firefox Full support 3 | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android Full support 4 | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown