Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Pattern Matching help needed

by tos (Deacon)
on Jun 27, 2003 at 14:13 UTC ( [id://269586]=note: print w/replies, xml ) Need Help??


in reply to Pattern Matching help needed

if you are in doubt about whether a character is a metacharacter in a regex, there is no harm in tyring to escape the sign. Then f.i. you could do this with the '@'-sign as you did it with the dot.

For letters and numbers you should use the \w-metacharacter. \s means all sorts of whitespaces.

so

$match =~ /\@(\w+)\./;
should do the job.

Apart from that is a view at man perlre highly recommended.

greetings, tos

Replies are listed 'Best First'.
Re: Re: Pattern Matching help needed
by Anonymous Monk on Jun 27, 2003 at 14:35 UTC
    Wow, Thanks for all the responses!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2024-03-28 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found