[Israel.pm] matching in line (fwd) on behalf of Ernst, Yehuda.B
Itamar Elem
elem at compugen.co.il
Thu Dec 2 07:07:18 PST 2004
hi
if i understand the problem try something like that
/(\w)(.*\1){4}/
where \1 is the memoized value of (\w) and {4} is to complete to 5 with the (\w)
itamar
-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il]On Behalf Of Shlomo Yona
Sent: Thursday, December 02, 2004 4:59 PM
To: perl at perl.org.il
Subject: [Israel.pm] matching in line (fwd) on behalf of Ernst, Yehuda.B
---------- Forwarded message ----------
Date: Thu, 2 Dec 2004 16:32:27 +0200
From: "Ernst, Yehuda" <yernst at nds.com>
Subject: matching in line
Hello!
I need to read a text file line by line and check every line if it has 5 same chars together in it.
if the file looks like this
lksdjvhhgaeifgas;dfjnafb
dlsjfhgq30874riwufh;wdofia
jsg55555dsbafoiewury20348r7y2-3495
only line 3 will be printed
is there a fast way using pattern match to do it?
thanks
Yehuda Ernst
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl
More information about the Perl
mailing list