Regular Expressions 101

Community Patterns

0

pens

Python
testing
Submitted by anonymous - 2 years ago
0

71871164

Python
Stack overflow example
Submitted by anonymous - 2 years ago
0

ipv4

PCRE2 (PHP >=7.3)
Find ipv4 addresses
Submitted by anon - 2 years ago
0

test

PCRE2 (PHP >=7.3)
test
Submitted by test - 2 years ago
0

#value # value

Python
account for comments
Submitted by anonymous - 2 years ago

Between two strings

-2

Regular Expression
Python

r"
# Keys are pretty much "any text before the '=' symbol" (?P<key>[^=]+) # Match the '=' symbol = (?P<value> # Lazy match .*? # Look-ahead (don't move the "regex cursor", just "peek forward") (?= # Match a '_' that has no other '_' between it and the '=' character, or... _(?=[^_=\n]+=) | # ... or the end of the line $ ) ) # Actually "consume" the '_' character if it exists (or just match the end-of-line) (?:_|$)
"
gmx

Description

Loading markdown...
Submitted by OnlineCop - 8 years ago