I’m appending a JavaScript to an HTML file using android. I have this part:
String JavaScriptStr = "this.value = this.value.replace(/[^0-9\.]/g,'');";
Eclipse gives me an error saying:
Invalid escape sequence (valid ones are \b \t \n, etc...)
How do I escape that JS string? Thanks for any help!
You have to escape
\, Try