Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Regular expression help

by gryphon (Abbot)
on Aug 17, 2005 at 21:19 UTC ( #484607=note: print w/replies, xml ) Need Help??


in reply to Regular expression help

Greetings beeconn66,

I'm not sure if this is exactly what you're looking for, and I'm certainly not a regex-master or anything, but how about this:

my $text = 'employee(firstname, lastname, soc)'; if ($text =~ /employee\(([^,\s)]+)\s*,\s*([^,\s)]+)\s*,\s*([^,\s)]+)/) + { print join("\n", $1, $2, $3); }

gryphon
Whitepages.com Development Manager (DSMS)
code('Perl') || die;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://484607]
help
Chatterbox?
[Tux]: test
[jedikaiti]: failed
[Tux]: No, it PASS'ed (testing patches to pm-cb-g)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-09-19 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (225 votes). Check out past polls.

    Notices?