Regular Expressions 101

Sponsors

Library entries

0
pcre2

IP Tables Rules

Match IP Tables Rules for logging
Submitted by Proffalken - a year ago
0
python

My html tag regex

My html tag regex
Submitted by anonymous - a year ago
0
pcre2

Hello World | Regex Number JS

Regex number
Submitted by mfilype - a year ago
0
pcre2

Ukrainian IBAN

Regex for UA IBAN
Submitted by Viacheslav Kozachok - a year ago
0
python

regex_email

메타문자 + 활용을 위한 예제
Submitted by anonymous - a year ago
0
pcre2

Suplementos de Calcio

Suplementos de Calcio
Submitted by anonymous - a year ago
0
pcre2

Hipovitaminosis

Hipovitaminosis
Submitted by anonymous - a year ago
0
pcre2

Insuficiencia hepática

Insuficiencia hepática
Submitted by slopez - a year ago
0
pcre2

Matches to time string: HH:MM

Matches to time string: HH:MM
Submitted by anonymous - a year ago

Parse URLs

Vote

1

Regular Expression
python

'''
(?#First, match the protocol) (?:https?|ftp):// (?#Next, check for optional username and/or password) (?#Note: The following two char classes are functionally equivalent) (?:[\x21-\x39\x3b-\x3f\x41-\x7e]+(?::[!-9;-?A-~]+)?@)? (?#Next, let's match the domain [with support for Punycode ]) (?:xn--[0-9a-z]+|[0-9A-Za-z_-]+\.)*(?:xn--[0-9a-z]+|[0-9A-Za-z-]+)\.(?:xn--[0-9a-z]+|[0-9A-Za-z]{2,10}) (?#Let's match on optional port) (?::(?:6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{1,3}|\d))? (?#Next, let's match on the path) (?:/[\x21\x22\x24\x25\x27-x2e\x30-\x3b\x3e\x40-\x5b\x5d-\x7e]*)* (?#Next, let's match on an anchor) (?:\#[\x21\x22\x24\x25\x27-x2e\x30-\x3b\x3e\x40-\x5b\x5d-\x7e]*)? (?#Last, but not least, we match on URI params) (?:\?[\x21\x22\x24\x25\x27-\x2e\x30-\x3b\x40-\x5b\x5d-\x7e]+=[\x21\x22\x24\x25\x27-\x2e\x30-\x3b\x40-\x5b\x5d-\x7e]*)? (?#Additional params) (?:&[\x21\x22\x24\x25\x27-\x2e\x30-\x3b\x40-\x5b\x5d-\x7e]+=[\x21\x22\x24\x25\x27-\x2e\x30-\x3b\x40-\x5b\x5d-\x7e]*)*
'''
gmxi

Description

Loading markdown...
Submitted by D. Torres - a year ago