Regular Expressions 101

Ignore lines started with # (hash)

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
^([^#].*)?^\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