Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regex to match words and numbers

by zek152 (Pilgrim)
on Jun 08, 2011 at 13:21 UTC ( [id://908708]=note: print w/replies, xml ) Need Help??


in reply to regex to match words and numbers

Seems like you just need to look at the first 1-2 character(s).

my @string = ('1. for future assistance ...','* You can also ...','Pag +e 2,','12345'); foreach my $string (@string){ if(($string !~ /(^[0-9]\.)|(^[*])|(^[A-Za-z])/)){ print "$string\n"; } } #OUTPUT #12345

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://908708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-25 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found