Re: Help matching with Regular expression

2009-02-08 Thread Jim
On Feb 7, 5:17 am, rob.di...@gmx.com (Rob Dixon) wrote: > Jim wrote: > > > How do I match a line ending in > > ,@@) > > using a regular expression? > > my $line = "1234567890,@@)\n"; > > if ($line =~ m/,@@\)$/) { >   print "OK\n"; > > } > > HTH, > > Rob Thanks that works -- To unsubscribe, e-mai

Re: Help matching with Regular expression

2009-02-08 Thread Dr.Ruud
Rob Dixon wrote: Jim wrote: How do I match a line ending in ,@@) using a regular expression? my $line = "1234567890,@@)\n"; if ($line =~ m/,@@\)$/) { print "OK\n"; } Be careful with unescaped "@" characters: $ perl -wle' my $line = "1234567890,@+)\n"; # print $line; my $qr = qr/,

Re: Help matching with Regular expression

2009-02-08 Thread Dr.Ruud
Jim wrote: How do I match a line ending in ,@@) using a regular expression? TIMTOWTDI: /,\...@\@\)$/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Help matching with Regular expression

2009-02-07 Thread Rob Dixon
Jim wrote: > > How do I match a line ending in > ,@@) > using a regular expression? my $line = "1234567890,@@)\n"; if ($line =~ m/,@@\)$/) { print "OK\n"; } HTH, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://lea

Help matching with Regular expression

2009-02-07 Thread Jim
How do I match a line ending in ,@@) using a regular expression? Thank you -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/