time-to-botec

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

repl.txt (995B)


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