<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: String Manipulation</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Better:</FONT>
</P>

<P><FONT SIZE=2>>>> orig = "aaa/bbb/ccc/dd"</FONT>
<BR><FONT SIZE=2>>>> orig.split('/')[-1]</FONT>
<BR><FONT SIZE=2>'dd'</FONT>
</P>

<P><FONT SIZE=2>.       Facundo</FONT>
</P>
<BR>

<P><FONT SIZE=2>#- -----Mensaje original-----</FONT>
<BR><FONT SIZE=2>#- De: Batista, Facundo [<A HREF="mailto:FBatista@uniFON.com.ar">mailto:FBatista@uniFON.com.ar</A>]</FONT>
<BR><FONT SIZE=2>#- Enviado el: Martes 15 de Julio de 2003 6:03 PM</FONT>
<BR><FONT SIZE=2>#- Para: Python-List (E-mail)</FONT>
<BR><FONT SIZE=2>#- Asunto: RE: String Manipulation</FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- >>> orig = "aaa/bbb/ccc/dd"</FONT>
<BR><FONT SIZE=2>#- >>> orig.split('/')[orig.count('/')]</FONT>
<BR><FONT SIZE=2>#- 'dd'</FONT>
<BR><FONT SIZE=2>#- >>></FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- .    Facundo</FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- #- -----Mensaje original-----</FONT>
<BR><FONT SIZE=2>#- #- De: lamar_air@hotmail.com [<A HREF="mailto:lamar_air@hotmail.com">mailto:lamar_air@hotmail.com</A>]</FONT>
<BR><FONT SIZE=2>#- #- Enviado el: Martes 15 de Julio de 2003 5:23 PM</FONT>
<BR><FONT SIZE=2>#- #- Para: python-list@python.org</FONT>
<BR><FONT SIZE=2>#- #- Asunto: String Manipulation</FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- I need a piece of code that takes a string like this string1 =</FONT>
<BR><FONT SIZE=2>#- #- "aaa/bbb/ccc/dd" and extracts a string containting the </FONT>
<BR><FONT SIZE=2>#- #- character after</FONT>
<BR><FONT SIZE=2>#- #- the last "/"</FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- So for this example the result would be "dd"</FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- like this:</FONT>
<BR><FONT SIZE=2>#- #- for i=0; string1.right(i) != '/'; i++</FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- result = string1.mid(i, string1.length())</FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- #- but in python.</FONT>
<BR><FONT SIZE=2>#- #- -- </FONT>
<BR><FONT SIZE=2>#- #- <A HREF="http://mail.python.org/mailman/listinfo/python-list" TARGET="_blank">http://mail.python.org/mailman/listinfo/python-list</A></FONT>
<BR><FONT SIZE=2>#- #- </FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- -- </FONT>
<BR><FONT SIZE=2>#- <A HREF="http://mail.python.org/mailman/listinfo/python-list" TARGET="_blank">http://mail.python.org/mailman/listinfo/python-list</A></FONT>
<BR><FONT SIZE=2>#- </FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><B><FONT SIZE=2>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .</FONT></B></P>

<P><B><U><FONT SIZE=2>ADVERTENCIA </FONT></U> </B>
</P>

<P><B><FONT SIZE=2>La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley. </FONT></B></P>

<P><B><FONT SIZE=2>Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. </FONT></B></P>

<P><B><FONT SIZE=2>Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada. </FONT></B></P>

<P><B><FONT SIZE=2>Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje. </FONT></B></P>

<P><B><FONT SIZE=2>Muchas Gracias.</FONT></B>
</P>

</BODY>
</HTML>