Regular expression is NOT working...
Posted: Mon Jan 31, 2005 5:32 pm
I must process a text to "real escape" it for use in a mysql database. I must replace "real" returns and new lines with the carachters "\n".
On a text like this
I replace "\r\n" with "\\n" (escaping the "\n" with an extra "\", but instead of "one\ntwo" all I get is "onentwo".
Any clue?
On a text like this
one
two
I replace "\r\n" with "\\n" (escaping the "\n" with an extra "\", but instead of "one\ntwo" all I get is "onentwo".
Any clue?