time-to-botec/squiggle/node_modules/@stdlib/utils/regexp-from-string/docs/repl.txt

30 lines
544 B
Plaintext
Raw Normal View History

{{alias}}( str )
Parses a regular expression string and returns a new regular expression.
Provided strings should be properly escaped.
If unable to parse a string as a regular expression, the function returns
`null`.
Parameters
----------
str: string
Regular expression string.
Returns
-------
out: RegExp|null
Regular expression or null.
Examples
--------
> var re = {{alias}}( '/beep/' )
/beep/
> re = {{alias}}( '/beep' )
null
See Also
--------