Re: how to make a regex for a ip address

2002-08-18 Thread perl-Krackedpress

I hope you have a good REF. for regex commands
O'Reilly's series book is the best I am told.

I do not have one for the IP address
but I have
email, zipcode, and phone


Here are the strings for regex
for the following


// check the email fields for validity
^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$

// check zipcodes for validity  - but not the last 4 business digits
  (^[0-9]{5})-([0-9]{4}$), trim($zip_code)) 
(!ereg(^[a-zA-Z][0-9][a-zA-Z][[:space:]][0-9][a-zA-Z][0-9]$



// check phone for validity
(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)




Timothy Lungstrom
Kracked Press Productions

[EMAIL PROTECTED]

**

- Original Message -
From: Janek Schleicher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 18, 2002 1:24 PM
Subject: Re: how to make a regex for a ip address


 Alex Chen wrote at Sun, 18 Aug 2002 17:14:21 +0200:

i am a beginners in perl.i am studying perl regex now ,and i want to
know
  how to make a regex for a ip address.

 Have a look to the
 Regexp::Common
 module from the CPAN.

 $RE{net}{IPv4} contains the regexp to match an ip address.


 Best Wishes,
 Janek


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How do you print 'C:\' ?

2002-08-18 Thread perl-Krackedpress


\ {slash} is one of the special {reserved} characters like .  ,   ; ,
and many others.

All these special {reserved} characters need the \ symbol to process it
to be able to be viewed

www.hostingelmira.com\testdir\test.html
would equal
www\.hostingelmira\.com\\testdir\\test\.html

Check your Perl manual
It should have a routine to convert
text with these special characters to text with the
\ {slash} added.

I know PHP has it, so Perl should have it too.

If you want, I will look for the string conversion routine
in my Perl documentation.





- Original Message -
From: Connie Chan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 18, 2002 4:57 PM
Subject: How do you print 'C:\' ?


 I wonder why ... I can't write a line like this :
 print 'C : \ ';
 but have to :  print 'C : \ \ ';
 however, I can : print 'C:\A_Dir\B_SubDir';
 The last ' is escaped, why ??

 Rgds,
 Connie


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




good list means good people behind it

2002-08-17 Thread perl-Krackedpress

I do not read this list as much as I would like.
I have archived over 1000 threads, to be read
as I have time.

Yes Connie Chan - this list seems to be policed
by a few good people.  Every list needs people
who would take the list they use to their heart and soul.

I wish I would find a list for PHP as good
as this PERL list.

I am just a beginner to Perl, PHP, MySQL, etc.
but not to programming.  I wish there was such 
a supportive system such as a list when I learned
various programming languages over 20 years ago.
This was before the PC's and at the start of cross 
system/manufacturers communications.

Thank you all who are out there, who take their time
to help all of us newcomers.  This is the best list
that I have come across since I started to look at
the list-support system.

Thank you all.
T. Lungstrom - programmer since late 1970's


 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]