<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 10:54 AM, Hs Hs <span dir="ltr"><<a href="mailto:ilhs_hs@yahoo.com" target="_blank">ilhs_hs@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div style="font-family:'times new roman','new york',times,serif;font-size:12pt">Dear group:</div></div></div></blockquote>
<div><br>Please send mail as plain text.  It is easier to read <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif">
<div style="font-family:'times new roman','new york',times,serif;font-size:12pt"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">
I have 50 thousand lists. My aim is to search a pattern in the alphabetical strings (these are protein sequence strings).</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><br></div><div style="background-color:transparent"><div style="background-color:transparent">
<span style="font-family:'times new roman','new york',times,serif;background-color:transparent">MMSASRLAGTLIPAMAFLSCVRPESWEPC VEVVP NITYQCMELNFYKIPDNLPFSTKNLDLSFNPLRHLGSYSFFSFPELQVLDLSRCEIQTIED</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent">my aim is to find the list of string that has V*VVP. </span></div>
</div></div></div></blockquote><div><br><h4><a name="asterisk" id="asterisk">Asterisk</a></h4>

  <p>The "*" matches 0 or more instances of the previous element.<br></p><p>I am not sure what you want, but I don't think it is this.  Do you want V then any characters followed by VVP?  In that case perhaps</p>
<p>V.+VP</p><p><br></p><p>There are many tutorials about how to create regular expressions<br></p><p><strong></strong><br></p><strong></strong><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div style="background-color:transparent"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">
<span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">
<span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><span style="font-size:16px">myseq = 'MMSASRLAGTLIPAMAFLSCVRPESWEPC VEVVP NITYQCMELNFYKIPDNLPFSTKNLDLSFNPLRHLGSYSFFSFPELQVLDLSRCEIQTIED'</span></span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><span style="font-size:16px"><br>
</span></span></div><div style="background-color:transparent"><font face="times new roman, new york, times, serif"><span style="white-space:pre-wrap">        </span>if re.search('V*VVP',myseq):</font></div><div style="background-color:transparent">
<span style="background-color:transparent"><font face="times new roman, new york, times, serif"><span style="background-color:transparent;white-space:pre-wrap">                </span><span style="background-color:transparent">print myseq</span><span style="background-color:transparent;white-space:pre-wrap">        </span> </font></span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent">the problem with this is, I am also finding junk with just VVP or VP etc. </span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent">How can I strictly search for V*VVP only. </span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent">Thanks for help. </span></div>
<span class=""><font color="#888888"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif"><span style="font-family:'times new roman','new york',times,serif;background-color:transparent"><br>
</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">Hs</div></font></span></div></div></div><br>_______________________________________________<br>

Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Joel Goldstick<br><br>
</div>