Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Matching a keyword, value and optional comma delimited values

by BooK (Curate)
on Dec 22, 2000 at 04:39 UTC ( [id://47979]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # match everything at once
    @everything = /^\s*(\w+)\s*=\s*(\w+)(\s*,\s*\w+)?(\s*,\s*\w+)?(\s*,\s*
    +\w+)?$/
    
  2. or download this
    # match the required part
    /^\s*(\w+)\s*=\s*(\w+)/gc;
    ($keyword, $value) = ($1,$2);
    # match the optional part
    @optional = /\G\s*,\s*(\w+)/g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-23 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found