time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (951B)


      1 
      2 {{alias}}
      3     Returns a regular expression to capture a Windows filename extension.
      4 
      5     When executed against dotfile filenames (e.g., `.gitignore`), the regular
      6     expression does not capture the basename as a filename extension.
      7 
      8     Returns
      9     -------
     10     re: RegExp
     11         Regular expression.
     12 
     13     Examples
     14     --------
     15     > var RE = {{alias}}();
     16     > var ext = RE.exec( 'C:\\foo\\bar\\index.js' )[ 1 ]
     17     '.js'
     18     > ext = RE.exec( 'C:\\foo\\bar\\.gitignore' )[ 1 ]
     19     ''
     20     > ext = RE.exec( 'foo\\file.pdf' )[ 1 ]
     21     '.pdf'
     22     > ext = RE.exec( '\\foo\\bar\\file' )[ 1 ]
     23     ''
     24     > ext = RE.exec( 'beep\\boop.' )[ 1 ]
     25     '.'
     26     > ext = RE.exec( 'index.js' )[ 1 ]
     27     '.js'
     28     > ext = RE.exec( '' )[ 1 ]
     29     ''
     30 
     31 
     32 {{alias}}.REGEXP
     33     Regular expression to capture a Windows filename extension.
     34 
     35     Examples
     36     --------
     37     > var ext = {{alias}}.REGEXP.exec( 'C:\\foo\\bar\\index.js' )[ 1 ]
     38     '.js'
     39 
     40     See Also
     41     --------
     42