Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
Created·2016-03-29 00:35
Flavor·PCRE (Legacy)

/
(([1-9][0-9]{2}|[1-9][0-9]|[1-9])\.([1-9][0-9]|[1-9][0-9]{2}|[0-9]))\.([0-9]|[1-9][0-9]|[1-9][0-9]{2})\.([0-9]|[1-9][0-9]|[1-9][0-9]{2})\:([1-9][0-9]{4}|[1-9][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[1-9])
/
g
Open regex in editor

Description

Matches proxies in ip:port format. Takes into account that octets cant start with a 0, and that octets that are not the first octet can be a 0 if there are no more numbers behind it.

Submitted by Dank meme machine