Re: Regular expression help pls !

2013-08-23 Thread jet speed
Chaps, I am testing all your code one by one, Appreciate your time and detailed inputs. Many Thanks Sj On Fri, Aug 23, 2013 at 6:01 PM, Jim Gibson wrote: > > On Aug 23, 2013, at 9:06 AM, jet speed wrote: > > > Chaps, > > > > Please i need help on the regular expression, i have the sample cod

Re: Regular expression help pls !

2013-08-23 Thread Jim Gibson
On Aug 23, 2013, at 9:06 AM, jet speed wrote: > Chaps, > > Please i need help on the regular expression, i have the sample code below. > I only want to match the entries from the array to the file and print the > matching line > > for example if i only want to match fc3/23, in my code it print

Re: Regular expression help pls !

2013-08-23 Thread Nathan Hilterbrand
See sample code below > Chaps, > > Please i need help on the regular expression, i have the sample code > below. > I only want to match the entries from the array to the file and print > the > matching line > > for example if i only want to match fc3/23, in my code it prints both > the > lines f

Re: Regular expression help pls !

2013-08-23 Thread David Precious
On Fri, 23 Aug 2013 17:06:41 +0100 jet speed wrote: > Chaps, > > Please i need help on the regular expression, i have the sample code > below. I only want to match the entries from the array to the file > and print the matching line > > for example if i only want to match fc3/23, in my code it

Re: Regular expression help pls !

2013-08-23 Thread Shawn H Corey
On Fri, 23 Aug 2013 17:06:41 +0100 jet speed wrote: > my @check = (fc3/23, fc10/1, fc3/14, fc12/12); my @check = qw( fc3/23 fc10/1 fc3/14 fc12/12 ); > > my $f2 = 'out.txt'; > for my $element(@check) { > open my $fh2, '<', $f2 or die "could not open $f2: $!"; > while (my $line = <$fh2>) { > cho

Re: Regular expression help pls !

2013-08-23 Thread Gianrossi, Paolo
Not sure I get it, but would /^fc3\/2\b/ (assuming you're looking for fc3/2 and not fc3/23) work? hth paolino On 23 Aug 2013, at 17:06, jet speed wrote: > Chaps, > > Please i need help on the regular expression, i have the sample code below. > I only want to match the entries from the array

Regular expression help pls !

2013-08-23 Thread jet speed
Chaps, Please i need help on the regular expression, i have the sample code below. I only want to match the entries from the array to the file and print the matching line for example if i only want to match fc3/23, in my code it prints both the lines fc3/2 and fc3/23. How to restrict to exact mat