On 8/11/2016 10:26 AM, Richard Klingler wrote: >>> /^.*\.ppp\..*$/ REJECT No email accepted from DSL users >>> /^.*\.dsl\..*$/ REJECT No email accepted from DSL users >> >> useless anchors... >> >> /\.dsl\./ REJECT ... >> /\.ppp\./ REJECT ... > > Hmm...but $/ is neeed if I want to completely reject a specific TLD like: > > /\.cn$/
This looks for a string ending with ".cn" The anchor is required to indicate the end of the string. /^.*\.dsl\..*$/ This looks for a string containing ".dsl." proceeded by anything and followed by anything. Since you don't care what comes before or after, the simplified equivalent expression is /\.dsl\./ Wildcard beginning and ending anchors are never required. /^.*foo/ is always equivalent to /foo/ /foo.*$/ is always equivalent to /foo/ /^.*foo.*$/ is always equivalent to /foo/ -- Noel Jones