Regular Expressions 101

Community Library

Community Library Entry

0

Regular ExpressionOpen Workspace

r"
^#!(/usr)?/bin/(env )?(ba)?sh$
"
gm

Description
Created·2020-10-25 14:02
Type·Match
Flavor·Python

This matches shell shebangs (bash / sh). It could be used e.g. to find shell files (via grep -m1 -EIrl '<exp>').

Submitted by Anonymous
Open Workspace