Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(\w+ (\w+) (\d+) (\d+:\d+:\d+) (\d+)) (?:\d+ bytes )?From (.+)icmp_seq=\d+ (ttl=\d+ )?(.*)(time=(\d+.\d+) ms)?
/
gmi

Description

ping -i 20 host | perl -nle 'print scalar(localtime), " ", $_'

Submitted by jb - 9 years ago