Regular expressions (regexp)

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
regexp:match()Chrome ? Edge ? Firefox Full support 3IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android Full support 4Opera Android ? Safari iOS ? Samsung Internet Android ?
regexp:replace()Chrome ? Edge ? Firefox Full support 3IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android Full support 4Opera Android ? Safari iOS ? Samsung Internet Android ?
regexp:test()Chrome ? Edge ? Firefox Full support 3IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android Full support 4Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown