Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(([a-z0-9]+|([a-z0-9]+[-]+[a-z0-9]+))[.])+[ \t]*(([a-z0-9]+|([a-z0-9]+[-]+[a-z0-9]+))[.])+[ \t]*+\(+\d{10,10}+[ \t]*+\d{3,10}+[ \t]*+\d{3,10}+[ \t]*+\d{3,10}+[ \t]*+\d{3,10}+[ \t]*\)
/

Description

oneliner SOA record matching regexp. like "ns1.domain.com.ge. mail.ns1.domain.com.ge. (2014061613 3600 600 604800 1800 )" without @ IN SOA in begging, usefull when implementing something like DNS GUI.

Submitted by Nick Chkhikvishvili - 10 years ago