Regular Expressions 101

Community Patterns

5

ipv6

PCRE (PHP <7.3)
Match an ipv6 address
Submitted by Frusty - 7 years ago
9

only numbers

PCRE (PHP <7.3)
A string with only numbers in
Submitted by Gotts - 8 years ago

Support metrics.agent.grafana.com/port or prometheus.io/scrape with or without K/V pairs for multiple ports

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^([^:;\n]*)(:\d+)?;([^;\n]*)(;.*\b\3\b=|;.*;|;)(\d+)(,.*|;)?$
/
gm

Description

Loading markdown...
Submitted by AaronB - 5 months ago
(Last modified 5 months ago)