time-to-botec/squiggle/node_modules/@stdlib/regexp/dirname-windows/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

38 lines
769 B
Plaintext

{{alias}}()
Returns a regular expression to capture a Windows path dirname.
Returns
-------
re: RegExp
Regular expression.
Examples
--------
> var RE = {{alias}}();
> var dir = RE.exec( 'foo\\bar\\index.js' )[ 1 ]
'foo\\bar'
> dir = RE.exec( 'C:\\foo\\bar\\.gitignore' )[ 1 ]
'C:\\foo\\bar'
> dir = RE.exec( 'foo\\file.pdf' )[ 1 ]
'foo'
> dir = RE.exec( '\\foo\\bar\\file' )[ 1 ]
'\\foo\\bar'
> dir = RE.exec( 'index.js' )[ 1 ]
''
> dir = RE.exec( '' )[ 1 ]
''
{{alias}}.REGEXP
Regular expression to capture a Windows path dirname.
Examples
--------
> var dir = reDirnameWindows.REGEXP.exec( 'foo\\bar\\index.js' )[ 1 ]
'foo\\bar'
See Also
--------