Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • v1.1
  • v1.0-rc4
  • v2.2-rc1
  • v1.0-rc3
  • v1.0-rc2
  • v2.0
  • v1.0-rc1
  • v0.9
  • v0.9.1
  • v1.0-rc
11 results

uos-latex-template

  • Clone with SSH
  • Clone with HTTPS
  • Forked from UoS LaTeX Group / University of Southampton Thesis Template
    Source project has a limited visibility.

    shebang-regex Build Status

    Regular expression for matching a shebang line

    Install

    $ npm install shebang-regex

    Usage

    const shebangRegex = require('shebang-regex');
    
    const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
    
    shebangRegex.test(string);
    //=> true
    
    shebangRegex.exec(string)[0];
    //=> '#!/usr/bin/env node'
    
    shebangRegex.exec(string)[1];
    //=> '/usr/bin/env node'

    License

    MIT © Sindre Sorhus