Regular Expressions 101

Community Patterns

1

Get <NIC>

Python
Get NICs from string
Submitted by anonymous - 7 months ago
1

emoji-test.txt

Python
emoji-test.txt
Submitted by anonymous - 4 months ago
1

Match each tag

Python
Match each tag in a lrc file
Submitted by Cricar - 2 months ago
1

Extract tag name and its content

Python
Lrc file
Submitted by Cricar - 2 months ago
1

Kafka loki parser

Golang
Kafka loki parser
Submitted by anonymous - 2 months ago
1

instagram url

Python
gets the url instagram
Submitted by samuel06santos - a month 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