Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^([^#].*)?^\s*dev1
/
gm

Description

Helps to search a line over a text file with ignoring (excluding from searching) the lines started with a # (hash) symbol

^([^#].*)?^\s*dev1

#| Environment | Port-prefix | Subnet | Target-host | #dev1 300 8 ibdock2 # dev1 300 8 ibdock2 #dev1 300 8 ibdock2 # dev1 300 8 ibdock2 dev1 300 8 ibdock2 dev1 300 8 ibdock2 dev 301 1 ibdock2

Submitted by anonymous - 6 years ago