[plug] code decipher
Craig Dyke
grail at enterprize.net.au
Mon Feb 24 20:30:25 WST 2003
----- Original Message -----
From: "Jon Miller" <jlmiller at mmtnetworks.com.au>
To: <plug at plug.linux.org.au>
Sent: Monday, February 24, 2003 8:11 PM
Subject: [plug] code decipher
Can anyone explain the what this statement does? I have a piece of code I'm
trying to figure out what this piece handles.
# A regex that will match any IPs you come from.
my $myips =
'^(128\.61\.44\.(92|31)|r44h(92|31)\.res.gatech.edu|.*\.jehsom\.com|adsl-20-
72-\d+\.asm\.bellsouth\.net)$';
^ = start of line
$ = end of line
\. = a period as '.' on its own will match any character
| = OR
* = zero or more occurences of preceding value (ie a* = zero or more lots of
'a' in a row)
\d = any digit 0 - 9
. = as said above, will match any character including whitespace, end of
line and so on
I think that about some up what is above, will let you work out from here
:))
Craig
More information about the plug
mailing list