Menu

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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.