time-to-botec/js/node_modules/@stdlib/regexp/regexp/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

40 lines
760 B
Plaintext

{{alias}}()
Returns a regular expression to parse a regular expression string.
Regular expression strings should be escaped.
Returns
-------
re: RegExp
Regular expression.
Examples
--------
> var RE = {{alias}}();
> var bool = RE.test( '/^beep$/' )
true
> bool = RE.test( '/boop' )
false
// Escape regular expression strings:
> bool = RE.test( '/^\/([^\/]+)\/(.*)$/' )
false
> bool = RE.test( '/^\\/([^\\/]+)\\/(.*)$/' )
true
{{alias}}.REGEXP
Regular expression to parse a regular expression string.
Examples
--------
> var bool = {{alias}}.REGEXP.test( '/^beep$/' )
true
> bool = {{alias}}.REGEXP.test( '/boop' )
false
See Also
--------