Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Pattern matching exlusion

by wrkrbeee (Scribe)
on Nov 29, 2014 at 02:54 UTC ( [id://1108690]=note: print w/replies, xml ) Need Help??


in reply to Re: Pattern matching exlusion
in thread Pattern matching exlusion

Hi Loops, Thank you for your help. Tell me if I am wrong concerning the interpretation of your expression: qr(10-KQA-Z0-9*(?!/))i; 1. You are saying find a string (QR) 2. which begins with 10-K or 10-Q KQ 3. followed by any letter from A-Z (A-Z] 4. followed by any number 0-9 [0-9} 5. excluding any string which terminates with slash *(?!/))i Is that right? If so, how would the expression change if I were looking for upper case letters only? Your insight is invaluable, and I am grateful! Rick

Replies are listed 'Best First'.
Re^3: Pattern matching exlusion
by Loops (Curate) on Nov 29, 2014 at 03:07 UTC

    The [A-Z0-9] part of the expression matches any letter or any number. And it's followed by an asterisk "*", which means zero or more instances. So "1B3" and "K4R" both match at that point in the pattern.

    To use upper case only, remove the trailing "i" from the initial $formget assignment.

      Thank you Loops, again I am grateful for your help. Could not do it without your insight. Thanks, and Happy Holidays! Rick

Log In?
Username:
Password:

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

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

    No recent polls found