"Kun" <[EMAIL PROTECTED]> wrote: > i have an html/cgi input that takes in values to a mysql database, > however, if i stick in $20 instead of 20, it crashes the program > because of the extra $ sign. I was wondering if anyone has a quick > regular expression in python to remove the $-sign if it is present in > the input.
RE? ex-perler? try strip+lstrip instead:
>>> text = " $12921 "
>>> text.strip().lstrip("$")
"12921"
</F>
--
http://mail.python.org/mailman/listinfo/python-list
