Re: regex variable matching when it's more than variable

2008-04-20 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: say I have my $var1 = 'abcdefg'; my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); Let's say I want to go through the array to see if $var1 exists and also to see if it followed by _ and then 4 digits (only first one should quailfy

Re: regex variable matching when it's more than variable

2008-04-20 Thread Rob Dixon
Richard Lee wrote: > say I have > > my $var1 = 'abcdefg'; > > my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); > > Let's say I want to go through the array to see if $var1 exists and also > to see if it followed by _ and then 4 digits (only first one should > quailfy , abc

Re: regex variable matching when it's more than variable

2008-04-20 Thread Dr.Ruud
Richard Lee schreef: > my $var1 = 'abcdefg'; > > my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); > > Let's say I want to go through the array to see if $var1 exists and > also to see if it followed by _ and then 4 digits (only first one > should quailfy , abcdefg_3432 )

Re: regex variable matching when it's more than variable

2008-04-20 Thread Dr.Ruud
Richard Lee schreef: > my $var1 = 'abcdefg'; > > my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); > > Let's say I want to go through the array to see if $var1 exists and > also to see if it followed by _ and then 4 digits (only first one > should quailfy , abcdefg_3432 ) >

Re: regex variable matching when it's more than variable

2008-04-20 Thread Aruna Goke
Richard Lee wrote: say I have my $var1 = 'abcdefg'; my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); Let's say I want to go through the array to see if $var1 exists and also to see if it followed by _ and then 4 digits (only first one should quailfy , abcdefg_3432 ) I

Re: regex variable matching when it's more than variable

2008-04-20 Thread John W. Krahn
Richard Lee wrote: say I have my $var1 = 'abcdefg'; my @array = ( 'abcdefg_3432', 'defg_333', 'abcdefg_' , 'abcdefg_a' ); Let's say I want to go through the array to see if $var1 exists and also to see if it followed by _ and then 4 digits (only first one should quailfy , abcdefg_3432 ) I