Top "Backslash" questions

The backslash character \ (not to be confused with slash /) is used in many languages to quote the next character, i.e. to make it lose its special meaning.

File path issues in R using Windows ("Hex digits in character string" error)

I run R on Windows, and have a csv file on the Desktop. I load it as follows, x<…

r filepath backslash path-separator
How to print a single backslash?

When I write print('\') or print("\") or print("'\'"), Python doesn't print the backslash \ symbol. Instead it …

python escaping backslash
String.replaceAll single backslashes with double backslashes

I'm trying to convert the String \something\ into the String \\something\\ using replaceAll, but I keep getting all kinds of …

java escaping backslash replaceall
Replace "\\" with "\" in a string in C#

I still don't get how to do this. I saw many posts regarding this, but none of the solutions worked …

c# string replace backslash
Escaping Strings in JavaScript

Does JavaScript have a built-in function like PHP's addslashes (or addcslashes) function to add backslashes to characters that need escaping …

javascript string escaping quotes backslash
Escaping backslash in string - javascript

I need to show the name of the currently selected file (in <input type="file"> element). Everything is …

javascript file input escaping backslash
How to remove backslash on json_encode() function?

How to remove the (\)backslash on a string? when using echo json_encode() ? For example: <?php $str = "$(\"#output\").append(\"&…

php ajax json function backslash
Java replace issues with ' (apostrophe/single quote) and \ (backslash) together

I seem to be having issues. I have a query string that has values that can contain single quotes. This …

java string replace escaping backslash
python replace single backslash with double backslash

In python, I am trying to replace a single backslash ("\") with a double backslash("\"). I have the following code: directory = …

python string replace backslash