http://qs321.pair.com?node_id=613349


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';