Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regular expression question

by Samy_rio (Vicar)
on May 03, 2007 at 10:40 UTC ( [id://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';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found