2010/5/13 geekbuntu <[email protected]>

>
> now if i write this to a table, how can i make it to the original
> string again?
>
>
if you wont have any "\" character in your string this may work otherwise it
looks difficult to determine which is original "\" which is to split

>>> string = '
http://ayaz.wordpress.com/2007/04/22/reescape-pythons-equivalent-of-phps-addslashes/
><><><'
>>> escaped = re.escape(string)
>>> print "".join(escaped.split("\\"))
http://ayaz.wordpress.com/2007/04/22/reescape-pythons-equivalent-of-phps-addslashes/
><><><


-- 
Aydın Şen

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to