Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Search for a character in CAPS

by ajwans (Scribe)
on Mar 07, 2002 at 05:18 UTC ( [id://149947]=note: print w/replies, xml ) Need Help??


in reply to Search for a character in CAPS

maybe what you want is
$agent =~ m/[A-Za-z]*/;
which will match a string of characters (uppercase or lowercase) or
$agent =~ m/PerlBeginner(Perl)?/;
Which will match the strings "PerlBeginner" and "PerlBeginnerPerl".

All of this is documented in the perlre perldoc.

1. dude, what does mine say?
2. "sweet", what about mine?
3. "dude", what does mine say?
4. GOTO 2

Replies are listed 'Best First'.
Re: Re: Search for a character in CAPS
by particle (Vicar) on Mar 07, 2002 at 15:01 UTC
    you propably meant $agent =~ m/[A-Za-z]+/; in the first example, the * will also match the null string...

    ~Particle ;Þ

Log In?
Username:
Password:

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

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

    No recent polls found