Regular Expressions 101

Community Patterns

IPv4 address from text

0

Regular Expression
Python

r"
(?:^|\b(?<!\.))(?:1?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:1?\d?\d|2[0-4]\d|25[0-5])){3}(?=$|[^\w.])
"
gm

Description

Found in here, stackoverflow url.

Submitted by anonymous - 2 years ago