Can regular expression be written in /private/etc/hosts file

2

abc.local
xyz.local
dumy.local
www.google.com
local.testserver.net

....

Can we write some kind of regular expression or Rule in "hosts" file to redirect certain domains ending .local to certain ip address. like using above domains.

192.168.0.10 *.local
192.168.0.1 www.*
192.168.0.100 local.*.*

// Hosts file path on Mac OS X is /private/etc/hosts and in windows c:/windows/system32/drivers/etc...

Asif

Posted 2010-08-13T23:45:15.203

Reputation:

Mac, not MAC, please. – Arjan – 2010-08-15T15:18:32.923

Answers

2

No, this is not possible.

See these related questions:

Mark Byers

Posted 2010-08-13T23:45:15.203

Reputation: 576

1

This is not possible in the hosts file. For acceptable syntax see this: /etc/hosts file

ennuikiller

Posted 2010-08-13T23:45:15.203

Reputation: 980