shebangLine

Create Matcher for a UNIX Shell $(LUCKY Shebang) Pattern.

@safe ref @safe pure nothrow
shebangLine

Examples

#!/bin/env rdmd

assert(`rdmd`.lit.shebangLine
			 .at(`#!/bin/env rdmd`) == 15);
assert(`rdmd`.lit.shebangLine
			 .at(`#!/usr/bin/env rdmd`) == 19);
auto rgdmd = alt(`rdmd`.lit,
				 `gdmd`.lit);
assert(rgdmd.shebangLine
			.at(`#!/usr/bin/env rdmd-dev`) == 19);
assert(rgdmd.shebangLine
			.at(`#!/usr/bin/env gdmd`) == 19);

See Also

Meta