Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Prevent inserting escape characters

Jimbo
2010-03-08
2012-09-19
  • Jimbo
    Jimbo
    2010-03-08

    Seemingly out of nowhere, mysqldb has been inserting escape characters
    (backslash specifically) in my queries.

    This is in the database when I query it directly:

    \:+\s(+.+.+.+)\s+\:

    Here is the same field when queried using mysqldb:

    \:+\s(+\.+\.+\.+)\s+\:

    What gives???

     
  • Jimbo
    Jimbo
    2010-03-08

    Nevermind, when using this in my regular expression, (r"%s" % variable_name)
    strips the backslashes.