Haha. so obvious. Thanks Malcolm

On Jun 28, 9:25 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2008-06-28 at 01:17 -0700, Jarred Bishop wrote:
> > hello, I'm trying to get the index of the last backslash from a string
> > in python.
>
> > The problem I have is that the backslash before the last quotation
> > mark, cancels out the quote.
>
> > eg: string.rfind("\") will error, because technically the string isn't
> > closed (as a backslash before a quote escapes it).
>
> Escape the backslash. :-)
>
>         my_string.rfind("\\")
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to