Re: Domain based sorting
LuKreme <[email protected]>
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
LuKreme <[email protected]> squawked out on Thursday 18-Aug-2011@12:14:46 > So, I started to think (dangerous, I know) and I searched and found Sean’s post from a few of years ago about dealing with getting domains in domain.co.uk sorts of situations: And a few minutes later I found Dan’s post in the same thread with (trimmed down to just the part I want) TLDREGEX = ([cC][oO][.][^.][^.]|[^.]+) # Get the domain name :0 * $ FQDN ?? ()\/[^.]+[.]$TLDREGEX^^ * MATCH ?? ^^\/[^.]+ { DOMPART = $MATCH } This works perfectly as far as I can tell. -- 'It's vital to remember who you really are. It's very important. It isn't a good idea to rely on other people or things to do it for you, you see. They always get it wrong.' --Sourcery