Hello, All: I'm curious about the behavior of backreferences in a regular expression that I've created:
$url = m|^(http://)?((\.?[a-z0-9][a-z0-9\-]+)+(\.[a-z0-9]){2,3})/| What's unusual about this regex is that the backreferences for any sub-domains (i.e., www, ftp, &c.) are not caputured. e.g., Setting $url equal to http://www.pretorious.net returns... $1 = http:// $2 = www.pretorious.net $3 = .pretorious $4 = .net While $2 holds the value that I am searching for, I'm still curious: How can I flexibly capture any sub-domain portions of the hostnames. (Even the tricky ones like www.developers.earthweb.com...) -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]