By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

Perl Regex Translation.

P: 4
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
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
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.