shebang-regex

WebJar for shebang-regex

License

License

MIT
GroupId

GroupId

org.webjars.bowergithub.sindresorhus
ArtifactId

ArtifactId

shebang-regex
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

shebang-regex
WebJar for shebang-regex
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/shebang-regex

Download shebang-regex

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/shebang-regex/ -->
<dependency>
    <groupId>org.webjars.bowergithub.sindresorhus</groupId>
    <artifactId>shebang-regex</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/shebang-regex/
implementation 'org.webjars.bowergithub.sindresorhus:shebang-regex:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/shebang-regex/
implementation ("org.webjars.bowergithub.sindresorhus:shebang-regex:1.0.0")
'org.webjars.bowergithub.sindresorhus:shebang-regex:jar:1.0.0'
<dependency org="org.webjars.bowergithub.sindresorhus" name="shebang-regex" rev="1.0.0">
  <artifact name="shebang-regex" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.sindresorhus', module='shebang-regex', version='1.0.0')
)
libraryDependencies += "org.webjars.bowergithub.sindresorhus" % "shebang-regex" % "1.0.0"
[org.webjars.bowergithub.sindresorhus/shebang-regex "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

shebang-regex

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'

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Versions

Version
1.0.0