468,316 Members | 1,992 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Perl Regex Translation.

Hi,

I am new to perl.
I just inherited a perl script that has this
Expand|Select|Wrap|Line Numbers
  1.   while ($input_sequence =~ /(  (.)\2{7,} | (..)\3{3,} | (...)\4{3,} | (.{4,100})\5{2,}  )/g)
  2.  
I've been trying to decipher exactly what this translate too.
Can any experts out there help me.

(input sequence contains a bunch of letters and number.
i.e.,

>gi|208965091|gb|ACI31834.1| factor Y-binding protein [Neisseria meningitidis]
MNRTAFCCFSLTAALILTACSSGGGGVAADIGAGLADALTAPLDHKDKGL QSLTLDQSVRKNEKLKLAAQ
GAEKTYGNGDSLNTGKLKNDKVSRFDFIRQIEVDGQLITLESGEFQIYKQ DHSAVVALQIEKINNPDKID
SLINQRSFLVSGLGGEHTAFNQLPSGKAEYHGKAFSSDDPNGRLHYSIDF TKKQGYGRIEHLKTPEQNVE
LASAELKADEKSHAVILGDTRYGGEEKGTYHLALFGDRAQEIAGSATVKI REKVHEIGIAGKQ

Thanks in advance,
mccalla
Nov 6 '08 #1
1 2627
KevinADC
4,059 Expert 2GB
The regular expression is checking for consecutive characters as in AAA or CCCCC and how many times those consecutive sets of characters occur in the string.
Nov 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by el_roachmeister | last post: by
77 posts views Thread by Hunn E. Balsiche | last post: by
6 posts views Thread by Stephen Ferg | last post: by
17 posts views Thread by Michael McGarry | last post: by
9 posts views Thread by Xah Lee | last post: by
13 posts views Thread by Michael M. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.