Any Perl book will have a chapter on Regular Expressions (Regexes for short)

but the master book if you really want to go deep into the subject is : 

Mastering Regular Expressions 
Powerful Techniques for Perl and Other Tools
By Jeffrey E. F. Friedl
<http://www.oreillynet.com/cs/catalog/view/au/666?x-t=book.view> 


See : 
http://www.oreilly.com/catalog/regex/
<http://www.oreilly.com/catalog/regex/> 

_____________________________________________
Bruno Bellenger
Sr. Network/Systems Administrator 

        -----Original Message-----
        From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
        Sent:   Tuesday, September 10, 2002 11:01 AM
        To:     [EMAIL PROTECTED]
        Subject:        Re: [Perl-unix-users] [PMX:##] Removeing www?

        Excellent that was it! Is there any docs and this anywhere where I
can tally
        up on filtering data like this etc?

        Thanks,
        John

        > this code-snippet:
        > ---------------------------------------------------
        >
        > $m = '[EMAIL PROTECTED]';
        > $m =~ s/^www\.//i if $m =~ /\@/;
        > print "$m\n";
        >
        > $m = '[EMAIL PROTECTED]';
        > $m =~ s/^www\.//i if $m =~ /\@/;
        > print "$m\n";
        >
        > $m = 'www.myrealemail.com';
        > $m =~ s/^www\.//i if $m =~ /\@/;
        > print "$m\n";
        >
        > ---------------------------------------------------
        > the print-result:
        >
        > [EMAIL PROTECTED]
        > [EMAIL PROTECTED]
        > www.myrealemail.com
        >
        > only in the first case, the 'www.' is removed
        >
        > --
        > Friedel Wittrock
        >
        >
        > -----Ursprüngliche Nachricht-----
        > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
        > Gesendet: Dienstag, 10. September 2002 10:28
        > An: [EMAIL PROTECTED]
        > Betreff: [Perl-unix-users] [PMX:##] Removeing www?
        >
        >
        >
        > I have a perl script that takes a user a password and an email
address
        along
        > with some other information. Problem is I get people created
profile
        > accounts with there email address prefixed by www. example:
        > [EMAIL PROTECTED] what I want to do is remove the www.
from the
        > rest of the email and preserve the original email before the entry
is
        > writing to file. I want to make sure that we are not removing www
if it is
        > in the email address example: [EMAIL PROTECTED] and only a
prepended www.
        !?
        > How would you accomplish this and distinguish between the two?
        >
        > Thanks!!!
        > John
        >
        > _______________________________________________
        > Perl-Unix-Users mailing list
        > [EMAIL PROTECTED]
        > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
        >

        _______________________________________________
        Perl-Unix-Users mailing list
        [EMAIL PROTECTED]
        To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to