Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regex help

by Ananda (Pilgrim)
on Nov 18, 2002 at 11:04 UTC ( #213710=note: print w/replies, xml ) Need Help??


in reply to Regex help

Hello Angel,

From the query you have posted i observe the following.

The function is tripping because the ^(caret) is outside the brackets([]) They need to be inside.

Using the for testing is perfectly ok the regex performs perfectly, once the caret is placed within the brackets.

my $in = "";

if ($in !~ /\w/) {print "contains non alpha numeric characters!!"; } else {print 'its all OK (_)';}

This should clarify your doubts. Cheers!!!

Anandatirtha

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2023-10-04 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?