time-to-botec/js/node_modules/@stdlib/regexp/dirname-windows/docs/repl.txt

38 lines
769 B
Plaintext
Raw Normal View History

{{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
--------