time-to-botec

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

repl.txt (965B)


      1 
      2 {{alias}}()
      3     Returns a regular expression to capture the last part of a Windows path.
      4 
      5     Returns
      6     -------
      7     re: RegExp
      8         Regular expression.
      9 
     10     Examples
     11     --------
     12     > var RE_BASENAME_WINDOWS = {{alias}}();
     13     > var base = RE_BASENAME_WINDOWS.exec( '\\foo\\bar\\index.js' )[ 1 ]
     14     'index.js'
     15     > base = RE_BASENAME_WINDOWS.exec( 'C:\\foo\\bar\\.gitignore' )[ 1 ]
     16     '.gitignore'
     17     > base = RE_BASENAME_WINDOWS.exec( 'foo\\file.pdf' )[ 1 ]
     18     'file.pdf'
     19     > base = RE_BASENAME_WINDOWS.exec( 'foo\\bar\\file' )[ 1 ]
     20     'file'
     21     > base = RE_BASENAME_WINDOWS.exec( 'index.js' )[ 1 ]
     22     'index.js'
     23     > base = RE_BASENAME_WINDOWS.exec( '.' )[ 1 ]
     24     '.'
     25     > base = RE_BASENAME_WINDOWS.exec( '' )[ 1 ]
     26     ''
     27 
     28 
     29 {{alias}}.REGEXP
     30     Regular expression to capture the last part of a Windows path.
     31 
     32     Examples
     33     --------
     34     > var match = {{alias}}.REGEXP.exec( 'foo\\file.pdf' )[ 1 ]
     35     'file.pdf'
     36 
     37     See Also
     38     --------
     39