43 lines
951 B
Plaintext
43 lines
951 B
Plaintext
|
|
||
|
{{alias}}
|
||
|
Returns a regular expression to capture a Windows filename extension.
|
||
|
|
||
|
When executed against dotfile filenames (e.g., `.gitignore`), the regular
|
||
|
expression does not capture the basename as a filename extension.
|
||
|
|
||
|
Returns
|
||
|
-------
|
||
|
re: RegExp
|
||
|
Regular expression.
|
||
|
|
||
|
Examples
|
||
|
--------
|
||
|
> var RE = {{alias}}();
|
||
|
> var ext = RE.exec( 'C:\\foo\\bar\\index.js' )[ 1 ]
|
||
|
'.js'
|
||
|
> ext = RE.exec( 'C:\\foo\\bar\\.gitignore' )[ 1 ]
|
||
|
''
|
||
|
> ext = RE.exec( 'foo\\file.pdf' )[ 1 ]
|
||
|
'.pdf'
|
||
|
> ext = RE.exec( '\\foo\\bar\\file' )[ 1 ]
|
||
|
''
|
||
|
> ext = RE.exec( 'beep\\boop.' )[ 1 ]
|
||
|
'.'
|
||
|
> ext = RE.exec( 'index.js' )[ 1 ]
|
||
|
'.js'
|
||
|
> ext = RE.exec( '' )[ 1 ]
|
||
|
''
|
||
|
|
||
|
|
||
|
{{alias}}.REGEXP
|
||
|
Regular expression to capture a Windows filename extension.
|
||
|
|
||
|
Examples
|
||
|
--------
|
||
|
> var ext = {{alias}}.REGEXP.exec( 'C:\\foo\\bar\\index.js' )[ 1 ]
|
||
|
'.js'
|
||
|
|
||
|
See Also
|
||
|
--------
|
||
|
|