Regular Expressions 101

Community Patterns

IP 3 words and a number

-2

Regular Expression
PCRE (PHP <7.3)

/
(\d+\.\d+\.\d+\.\d+)\s+([\w\-]+)\s+([\w\-]+)\s+(\w+)\s+(\d+)\s+
/

Description

Matches an Ip and any 3 words and a number after separated by any number of spacing characters.

Submitted by Attalward - 10 years ago