Regular Expressions 101

Sponsors

Library entries

1
python

Nuclear Exploit Kit

Nuclear Exploit Kit Requested file
Submitted by anonymous - 7 years ago
1
pcre

Delte first symbols in line

no description available
Submitted by Ilya Korzh - 7 years ago
1
python

f

f
Submitted by f - 7 years ago
1
pcre

magento digits-range validation

no description available
Submitted by anonymous - 7 years ago
1
pcre

currency-50-100000

no description available
Submitted by anonymous - 7 years ago
1
pcre

extraction

jamie sucks
Submitted by me - 7 years ago
1
pcre

MyRegexOnVeb

Выражения на вебы
Submitted by Legend072 - 7 years ago
1
pcre

RFC2616 HTTP Header Date

no description available
Submitted by anonymous - 7 years ago
1
pcre

test

no description available
Submitted by anonymous - 7 years ago
1
python

Line VTY

Used to search line vty for exec
Submitted by Hozenya - 7 years ago
1
pcre

android strings tester

replace .* with a test string
Submitted by l3d00m - 7 years ago
1
pcre

Git merge replacements

Group 1 gives ours, group 2 gives theirs
Submitted by Erik - 7 years ago
1
pcre

H

I
Submitted by anonymous - 7 years ago
1
pcre

Update something

no description available
Submitted by anonymous - 7 years ago
1
pcre

WKT POINT to longtitude and latitude

no description available
Submitted by anonymous - 7 years ago

ipv4 IP addressses, capturing private ranges

Vote

1

Regular Expression
pcre

/
# Match ipv4 IP addresses # Specifically capture private IPs before matching the more global # 0.0.0.0 - 255.255.255.255 octet ranges. ^(?P<private_10_ip> 10\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]) )$ | ^(?P<private_169_ip> 169\. 254\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]) )$ | ^(?P<private_172_ip> 172\. (?:1[6-9]|2[0-9]|3[0-1])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]) )$ | ^(?P<private_192_ip> 192\. 168\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]) )$ | ^(?P<all_ip> (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\. (?:[01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]) )$
/
gmx

Description

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