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

40 lines
965 B
Plaintext

{{alias}}()
Returns a regular expression to capture the last part of a Windows path.
Returns
-------
re: RegExp
Regular expression.
Examples
--------
> var RE_BASENAME_WINDOWS = {{alias}}();
> var base = RE_BASENAME_WINDOWS.exec( '\\foo\\bar\\index.js' )[ 1 ]
'index.js'
> base = RE_BASENAME_WINDOWS.exec( 'C:\\foo\\bar\\.gitignore' )[ 1 ]
'.gitignore'
> base = RE_BASENAME_WINDOWS.exec( 'foo\\file.pdf' )[ 1 ]
'file.pdf'
> base = RE_BASENAME_WINDOWS.exec( 'foo\\bar\\file' )[ 1 ]
'file'
> base = RE_BASENAME_WINDOWS.exec( 'index.js' )[ 1 ]
'index.js'
> base = RE_BASENAME_WINDOWS.exec( '.' )[ 1 ]
'.'
> base = RE_BASENAME_WINDOWS.exec( '' )[ 1 ]
''
{{alias}}.REGEXP
Regular expression to capture the last part of a Windows path.
Examples
--------
> var match = {{alias}}.REGEXP.exec( 'foo\\file.pdf' )[ 1 ]
'file.pdf'
See Also
--------