Regular Expressions 101

Sponsors

Library entries

0
pcre

Time in hh:mm:ss

19h32min16s
Submitted by anonymous - 16 days ago
0
python

SUBTOTAL

SUBTOTAL 15.88
Submitted by KRISHNA - 16 days ago
0
python

DEPIT INFO

K
Submitted by K - 16 days ago
0
python

Regex

wifiwnsml
Submitted by krishabj - 16 days ago
0
javascript

Email regex

email regex with subdomain
Submitted by anonymous - 16 days ago
0
pcre2

INI values

not done yet
Submitted by anonymous - 17 days ago
0
pcre2

JOOMLA_KEY

Identifies Joomla! Language Keys
Submitted by anonymous - 19 days ago

A 'Bulletproof' URL Regular Expression Parser

Vote

0

Regular Expression
pcre

/
((?<SCHEME>(?:https?))(?<HOSTNAME>\:\/\/(?:www.|[a-zA-Z.]+)[a-zA-Z0-9\-\.]+\.(?:biz|ca|com|edu|gov|info|me|mil|museum|name|net|org|uk|ru|us))?(?<PORT>\:[0-9][0-9]{0,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?(?<PATH>[a-zA-Z0-9\-\.\/]+)?(?<QUERY>(?:\?$|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$\=~_\-\*]+))?(?<FRAGMENT>#[a-zA-Z0-9\-\.]+)?)
/
gm

Description

Loading markdown...
Submitted by anonymous - 2 years ago