Re: backreference in regexp

2006-09-26 Thread D. Bolliger
chen li am Dienstag, 26. September 2006 15:52: > Hi all, Hi chen > I see some codes as following > > my $regexp= "(([gatc]{3})\\2{3,})"; Single quotes would make the double slash unnecessary: my $regexp= '(([gatc]{3})\2{3,})'; [...] > What is the meaning of {3,} of in \2{3,} ? > > I know \2 i

RE: backreference in regexp

2006-09-26 Thread Thomas Bätzler
chen li <[EMAIL PROTECTED]> asekd: > I see some codes as following > > my $regexp= "(([gatc]{3})\\2{3,})"; > > my $string=~/$regexp/; > > What is the meaning of {3,} of in \2{3,} ? The previous element is repeated thrice or more often. The general syntax is {n,m} where the previous element is

RE: backreference in regexp

2006-09-26 Thread chen li
--- Thomas Bätzler <[EMAIL PROTECTED]> wrote: > chen li <[EMAIL PROTECTED]> asekd: > > I see some codes as following > > > > my $regexp= "(([gatc]{3})\\2{3,})"; > > > > my $string=~/$regexp/; > > > > What is the meaning of {3,} of in \2{3,} ? > > The previous element is repeated thrice or m

Re: backreference in regexp

2006-09-26 Thread chen li
> Check perldoc perlre, "Regular Expressions": > > " The following standard quantifiers are > recognized: >[...] >{n}Match exactly n times >{n,} Match at least n times >{n,m} Match at least n but not more than > m times > " > > "\2{3,}"