Regular Expressions 101

Sponsors

Library entries

0
pcre2

Email Regex

A well equiped regex
Submitted by anonymous - 3 hours ago
0
pcre2

Soundcloud pattern

Soundcloud pattern
Submitted by anonymous - 4 hours ago
0
pcre2

YouTube regex pattern v2

YouTube regex pattern v2
Submitted by anonymous - 6 hours ago
0
javascript

https

https
Submitted by anonymous - 8 hours ago
0
pcre2

suprnana

whodis
Submitted by anonymous - 12 hours ago
0
python

meter number

meter number
Submitted by econ - 17 hours ago
0
pcre2

Divide AAAA and MMGG

Division between AAAA and MMGG
Submitted by Alessandro - a day ago
0
pcre2

auth.log grouping

Putting auth.log file into groups.
Submitted by Jason King - a day ago
0
python

whatsapp meta data

[8/23/18, 2:05:50 PM]
Submitted by Mandar Gite - 2 days ago
0
python

bkengine 单行宏匹配

bkengine 单行宏匹配
Submitted by anonymous - 2 days ago
0
python

取等号两边的数据

取等号两边的数据
Submitted by 小沙盒工作室 - 2 days ago
0
dotnet

URL

(@url)([\s]=[\s])(?:')(.)(?:')(?:;)
Submitted by anonymous - 3 days ago

Split address line into street name and house number

Vote

6

Regular Expression
pcre

/
\A\s* (?: ######################################################################### # Option A: [<Addition to address 1>] <House number> <Street name> # # [<Addition to address 2>] # ######################################################################### (?:(?P<A_Addition_to_address_1>.*?),\s*)? # Addition to address 1 (?:No\.\s*)? (?P<A_House_number_1>\pN+[a-zA-Z]?(?:\s*[-\/\pP]\s*\pN+[a-zA-Z]?)*) # House number \s*,?\s* (?P<A_Street_name_1>(?:[a-zA-Z]\s*|\pN\pL{2,}\s\pL)\S[^,#]*?(?<!\s)) # Street name \s*(?:(?:[,\/]|(?=\#))\s*(?!\s*No\.) (?P<A_Addition_to_address_2>(?!\s).*?))? # Addition to address 2 | ######################################################################### # Option B: [<Addition to address 1>] <Street name> <House number> # # [<Addition to address 2>] # ######################################################################### (?:(?P<B_Addition_to_address_1>.*?),\s*(?=.*[,\/]))? # Addition to address 1 (?!\s*No\.)(?P<B_Street_name>\S\s*\S(?:[^,#](?!\b\pN+\s))*?(?<!\s)) # Street name \s*[\/,]?\s*(?:\sNo\.)?\s+ (?P<B_House_number>\pN+\s*-?[a-zA-Z]?(?:\s*[-\/\pP]?\s*\pN+(?:\s*[\-a-zA-Z])?)*|[IVXLCDM]+(?!.*\b\pN+\b))(?<!\s) # House number \s*(?:(?:[,\/]|(?=\#)|\s)\s*(?!\s*No\.)\s* (?P<B_Addition_to_address_2>(?!\s).*?))? # Addition to address 2 ) \s*\Z
/
x

Description

Loading markdown...
Submitted by Andre Wisplinghoff - 8 years ago