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

Re: Regular expression question

by Samy_rio (Vicar)
on May 03, 2007 at 10:40 UTC ( #613349=note: print w/ replies, xml ) Need Help??


in reply to Regular expression question

Hi megaurav2002, if I understood your question correctly then the following would will help you.

use strict; use warnings; my @array = qw(id_1_1 id_2); for (@array){ print "$1\n" if (m/id\_(\d+)(?!\_)/); } __END__ Output: ------ 2

Also look into How (Not) To Ask A Question

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';


Comment on Re: Regular expression question
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (17)
As of 2015-07-29 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls