Regular Expressions 101

Community Patterns

Extract Top Level Domain name from IIS site SSL Certificate name

0

Regular Expression
PCRE (PHP <7.3)

/
(.*\d*\:)?(\w+\.+\w..$)
/
gm

Description

Returns only the last two levels of a domain name from an IIS website SSL certificate. Useful for grouping multiple certificates by Top-Level-Domain (TLD)

Submitted by anonymous - 4 years ago