Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 wandering the Monastery: (3)
As of 2014-12-28 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls