store filename path

Using <input type="file" to search for a filename and store in a database field.  The "\" and the characters following it get treated as a control character.  How can I avoid this?
dmarnloAsked:
Who is Participating?
 
Tacobell777Commented:
Just run
replace( string, "\", "\\", "all" )
over your regex
0
 
trailblazzyr55Commented:
can you display your code? it would be easier to explain the problem as well as know what is going wrong... :o)
0
 
Dain_AndersonCommented:
If you're using regular expressions, you have to escape the control characters with a backslash: \\

-Dain
0
 
andw928Commented:
Wherever you have your regex, instead of using a single \ ... use a double \\ which tells the regex engine to escape the backwards slash itself.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.