1,005 questions
-6
votes
1
answer
61
views
Backslash escaping issue in AI generated answers [closed]
So, there is a websocket server (game) and requires socket.io messages like this: 42["game:chat-public:msg","{\"id\":\"2qxgs2\",\"pId\":\"nfityk\"...
2
votes
3
answers
148
views
When setting pattern property from a string in JavaScript, how to preserve the backslashes?
Related to Properly simulate "pattern" attribute with javascript:
How do I set an input pattern using JavaScript?
when I try element.pattern = 'a\S' (as a trivial example), then the pattern ...
0
votes
0
answers
71
views
Why does my last printed line disappear when using \r in VS Code terminal
why in this code in the vs code the last output cleared I think we should have "...." ??
from time import sleep
c=1
while c<5 :
print("."*c+"\r",end='')
sleep(...
0
votes
2
answers
87
views
Escape backslashes in a Visual Studio template parameter
Creating a Visual Studio project template, I need to use the $solutiondirectory$ parameter in the "commandLineArgs of a launchSettings.json file. $solutiondirectory$ return a string with single ...
0
votes
0
answers
61
views
Shell script to take windows path as argument to change directory
I wrote a simple shell script to change path where folder path is provided in Windows format (it would be very handy to copy/paste path from windows and provide it to unix cd).
Here is the script
...
1
vote
0
answers
21
views
How to change focus to dropdown panel after opening dropdowns in slash command. And set one plugin as default to navigate between plugins
_getPluginListItemsDefinitons() {
const editor = this.editor;
const locale = editor.locale;
this._dropdown = createDropdown(locale);
this._commandItems = [];
...
1
vote
2
answers
88
views
why does string -replace operator to duplicate backslashes (as neeeded for wmic input) result in 4 backslashes
One might need to replace each backslash in a string, say a file path, with double-backslash. Eg, wmic requires this (eg: https://stackoverflow.com/a/50878476/4582204).
So one might try this code
'foo\...
0
votes
1
answer
104
views
How to replace \"" with \""" in R?
I have a tsv that has some fields with some escaped double quotation marks (DQM). Those are fine, but the problem comes when the DQM delimiter comes after one of those and then when the tsv is opened ...
2
votes
1
answer
98
views
How do I keep backslashes from being removed in a user input in Octave?
I'm writing a script that requires the user to copy and paste a file path as an input, which obviously includes several backslashes. This is stored as a string, but for some reason Octave is ...
0
votes
0
answers
69
views
How to remove backslash from a very long string?
I have a string with more than 3000 characters and I have a couple of backslash that I want to remove, but none of the methods I tried worked.
When I tried to remove the backslash from an example ...
0
votes
2
answers
3k
views
Powershell get full filepath using Get-ChildItem
I am new to powershell and using it as a one off to help me extract some files I've collected during my experiments.
I have many data sets with nested subfolders of processed data. They all have a ...
-1
votes
2
answers
51
views
how to avoid escape letters in reading text file [duplicate]
I'm reading a CSV file separated by ';'.
As basic example consider this "file.csv":
a1;a2;/unixpath/file1;a4
b1;b2;\winpath\file2;b4
Some fields contain windows path, and so use the ...
-2
votes
2
answers
92
views
'\' Is causing undefined errors in my project [closed]
Yes, I do know that \ is an escape character. I am writing a code for a keyboard, and I have to have the key \, of course. Now, the problem is, that this key must have a data attribute, which I put as ...
0
votes
1
answer
538
views
how to eliminate trailing newlines and store the result in variables
As the title says, I want to eliminate trailing newlines and store the result in variables (Bash).
The following does not work.
[xxx@ ~]$ var=`echo 'abc\ndef\n' | sed 's/\\n$//g'`
[xxx@ ~]$ echo $var
...
0
votes
1
answer
2k
views
Stop Power Automate from escaping backslash
I am using a flow that was working fine a few months ago. It includes an HTTP Get call with basic authentication. The username includes a backslash (e.g. test\login).
But whenever I add this loging as ...
0
votes
1
answer
778
views
python escape $ in string and save as variable
I know that it's easy to escape $ in python if you want to print it:
>>> char='$'
>>> print(f'\{char}')
\$
but that's not what I need. I want to save it in a variable; however, i'll ...
1
vote
1
answer
110
views
Ruby replace backslash with double backslash in a String [duplicate]
I have this little problem that bugs me. I need to double every backslash in a string, for exaple, If have a string 1 \ 2, I whish to transform it into 1 \\ 2. I don't see why the code below fails. ...
0
votes
1
answer
354
views
Jackson :loosing backslash from json string during deserialiastion
Unable to retain the backslash in the java object after deserialtion
I have below json
{\"Num\":\"44566\677\"}"
When I deserialise this to object
I am loosing the backslash
...
1
vote
1
answer
698
views
How to show the backslash commands in PostgreSQL?
With \help or \h below, I could show the SQL commands as shown below:
\help
Or:
\h
postgres=# \help
Available help:
ABORT CREATE USER
ALTER AGGREGATE ...
0
votes
0
answers
32
views
MariaDB REGEXP with escaping backslash has strange behaviour [duplicate]
I use MariaDB 10.6.8 and found this strange behaviour when using backslash and escaping backslash.
SET @x := 'abc\\def';
SELECT @x;
-- abc\def
SELECT @x REGEXP '\d' ; -- 1 why this gives no ...
1
vote
0
answers
69
views
Character constant ignore
I need to compare variable value with backslash symbol:
char symbol;
/* assigning a value to
a variable */
if (symbol == '\') {
// some action
}
But my Visual Studio recognizes it as a character ...
0
votes
1
answer
862
views
How can I escape the Backslash character in a makefile?
There are several posts about trying to escape characters in a Makefile.
I am interested in escaping the backslash \.
I need to dynamically build a path according to the OS. So, I wrote a condition ...
0
votes
2
answers
47
views
I am running MySQL query with \ in the where column and getting no results
I am running the below MySQL query from c# code and the backlash is recognized only I enter it twice. Is it something I am missing in MYSQL database settings that's causing this
Not Working
SELECT * ...
-1
votes
2
answers
75
views
Regex to include comma in java split function
I want to have a split function that splits String based on delimiter "," but that should not be taken as delimiter in some cases.
lets say:
String= "one,two,three"
Array=String....
0
votes
1
answer
362
views
How to use Backslash in a value of a json object in javascript
I am using a below code and getting the results mentioned. My question is I need to use a single backslash in my value of a json object. Please help how to use it.
var text = 'jeep\\sand';
console.log(...
0
votes
1
answer
98
views
How to Parse the String Backslash "\\" with hex values in Python
I'm trying to parse URLs and count the number of Backslashes. However, in Python, this sign does not parse URLs with hex values. When I use another symbol, such as a slash ('/'), the code works well ...
0
votes
2
answers
302
views
How to display Unicode symbols of playing card in Python to the terminal?
Why doesn't this work? I remove an extra backslash in a data file, but the Unicode characters are not displayed in the console?
import re
file = open("arrayOfCards",'r')
while True:
...
0
votes
1
answer
132
views
C# API Request starts with a Backslash
I'm fairly new to c# and programming. I made a little program for my company to automatically provide new telefons and patterns.
It worked fine until the phone extension/pattern got changed to start ...
5
votes
1
answer
974
views
Unexpected backslash and line breaks in VS code integrated terminal
When using Git Bash (oh-my-zsh and p10k) from the VS Code integrated terminal I get a backslash in front of my prompt after pressing ENTER and I get an unexpected linebreak when there are p10k ...
0
votes
1
answer
36
views
PHP $_GET NOT WORKING (BackSlashes Duplicated)
I am having the exact same issue as shown here: Why does _GET in PHP wrongly decodes slash?
An HTML form passes the parameters, so there is no need for urlencode(). If it passes a single backslash (&...
0
votes
0
answers
80
views
Telerik openaccess does not read SQL-server tables, can it be caused by the double backslash in the connectionstring?
I'm working on a C# application, based on Telerik's OpenAccess technology.
The following piece of source code does not give any results (although the corresponding table contains a lot of data):
List&...
0
votes
5
answers
108
views
How can I programmatically build a string containing escaped characters to pass as an argument to a function in Python?
I am trying to build the string below programatically:
string0 = 'case when \"LETTER\" in (\'a\',\'b\') then \"LETTER\" else \'other letter\' end'
I do:
a_list = ['a','b']
string = ...
-1
votes
2
answers
157
views
decoding dictionary to string without backslashes "\"
I have string:
"{\"paymentData\":{\"data\":\"xxxxxxxx\",\"signature\":\"xxxxxxxxx\",\"header\":{\"publicKeyHash\":\"...
0
votes
2
answers
2k
views
Replace Backslash when converting to JSON Array in Azure Logic App
I am trying to fetch a JSON Array, however the Logic App Response it itself is appending a backslash to the response.
Output expected :- {
"ABC": [
"000D",
"100D",
"...
-2
votes
1
answer
129
views
replacingOccurrences(of: "\\", with: "") method not work
I have string:
let tokenStr = """
{"paymentData":{"data":"\(tokenApplePay.paymentData.data)","signature":"\(...
0
votes
0
answers
230
views
How to escape a '\' in a string before casting to a bytea?
I am trying to resolve an error that occurs when users are entering text that contains a single backslash thus throwing an error when we cast the string to a bytea.
Error logs:
2023-04-12 18:10:37.249 ...
0
votes
1
answer
228
views
Searching for backslash character in string in C#
I am strugling with getting the index of sequence "\a\b" in string. Any idea how to do it? I am doing following:
string expr = "Hello\a\b";
Console.WriteLine(expr.IndexOf("\a\...
0
votes
1
answer
1k
views
How can I prevent extraneous backslashes processing JSON in Logic Apps
I have a Logic App that queries Graph APIs and passes JSON data to a SQL Server stored procedure; this was working fine. But then I found some executions were taking too long (~10 mins) so I changed ...
0
votes
2
answers
230
views
The backslash on last line for multi-line variable definition in Makefile
I have one concern on the last line with backslash if the following line coming without delimiter(whitespace). Is there any other side-effect for this coding style? Specifically, for backslash in the ...
2
votes
1
answer
730
views
Spark regexp_extract to extract informations containing backslash
I have a problem to extract informations in column from dataFrame containing backslash character.
Here, an example of data in my dataFrame:
id
repo_path
1
\folder1\folder2\folder3
2
\folderA\folderB\...
1
vote
0
answers
387
views
git cannot open the .gitconfig file although it exists
I am using git inside visual studio. Unfortunately config --global information cannot be accessed or edited. It seems that git is using the string '%USERPROFILE%/.gitconfig' and failing where if it ...
0
votes
0
answers
206
views
Postman - json request string contains auto-added backslashes
My json request has a timestamp value as below:
"startDate":"2023-03-15T00:00:00"
When I call an API with this request, I got an error
Can not deserialize value of type java.time....
0
votes
5
answers
497
views
Replace backslash followed by double quotation in a text file in Python
I have a text file, and its content is like this:
"good to know it \" so nice \" "
I use Python to read its contents and want to replace " with an empty string.
The code I am ...
-4
votes
2
answers
366
views
Iterating over Unicode Characters [closed]
I wanted to loop over Unicode-Characters in Python like this:
hex_list = "012346789abcdef"
for _1 in hex_list:
for _2 in hex_list:
for _3 in hex_list:
for _4 in ...
0
votes
1
answer
809
views
how to split string in Snowflake by single backslash
have a problem I can't solve directly using Snowflake docs:
I have a strings like 'abc\def'
need to split it to 'abc', 'def'
tried:
split_to_table('abc\def', '\\') - error
strtok_to_array('abc\def', '\...
-1
votes
1
answer
58
views
How can I display a string with its rational expressions, such as '\'
I want to display a rational expression using Python 3. Because it is stored in my variable, it applies the effect of the backslash on my terminal, here is the rational expression I try to display :
...
0
votes
0
answers
45
views
How to make non iterative code faster than the iterative when using line by line backslash inverse?
This code creats a matrix B contains the product of the each line of A by the backslash inverse of a aline of x
A = [1,2,3,8,1;10,45,7,3,1;9,8,15,75,65,];
x = [14,5,11,15,33;7,1,9,1,1;87,45,11,0,65];
...
-3
votes
3
answers
538
views
Remove all files from Git repo history with path having escape \ in filename with git filter-repo
I have special filenames with escape \ characters stored in Git repository on Debian 10 Linux.
Problem: it is not possible to git checkout files on Windows, which have incompatible characters in the ...
-1
votes
2
answers
70
views
how to use sed to replace all backslashes with double quote?
I am trying to use this to replace all backslashes with double quotes.
sed -e "s/'\\\\''/\"/g" nomefile
this doesn't do anything.
Input: "prova d\"amico"
Desired output: ...
0
votes
0
answers
29
views
Long pause after mapping backslash to `gt`?
In my current workflow I use tabs quite a bit, and always end up either typing gtgtgtgt in quick succession or 4gt to skip to the 4th tab.
This seems unnecessary, so I mapped my backslash key to act ...