Questions tagged [escaping]

Escaping is the process of applying an alternate meaning to a character or set of characters.

Filter by
Sorted by
Tagged with
2 votes
1 answer
39 views

special characters are not saved

I needed to create a script to automate some procedures but I have a question when I use the command in .ps1 New-Item -Path $env:userprofile\Desktop\Cloack -Name "test.json" -ItemType "...
Андрей Киселев's user avatar
-2 votes
1 answer
56 views

Perl: Why Regex double backslash with character does not recognize string with single backslash with character? [closed]

Why does this Regex does not give 1? >perl -e "$x = 'abcd\\e'; print \"$x\n\"; ($x =~ '\\e') ? print 1:print 0"; abcd\e 0
giordano's user avatar
  • 2,966
-1 votes
0 answers
27 views

How do I unescape JSON content from Newtonsoft for Python? [closed]

In my Python server, I am receiving data from a C# client using Newtonsoft. The data looks like this: {"data":"{\"hello\":\"Hello \",\"world\":\"...
Evorlor's user avatar
  • 7,300
0 votes
0 answers
28 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 ...
giordano's user avatar
  • 2,966
-1 votes
0 answers
14 views

replacing "/" with "\/" in a string with Python [duplicate]

I am trying to escape forward slashes in a string with a single backslash (so '/' -> '\/') so that the resulting string can be fed to sed. When using Python, calling string.replace('/','\/') keeps ...
Luca Giorgi's user avatar
-1 votes
0 answers
27 views

Encoding(escaping) and decoding(unescaping) questions

Maybe this is a dumb question, but What is best practice for escaping and unescaping? Currently I am validating inputs on the frontend using Yup(with react-hook-form) to validate the correct type and ...
Juan Portillo's user avatar
1 vote
1 answer
25 views

Python fails to find path which exists in windows

I have this python code: import os import shutil # Function to get the total size of a directory including subdirectories def get_directory_size(path): total_size = 0 for dirpath, dirnames, ...
arielma's user avatar
  • 1,318
-1 votes
2 answers
52 views

How do I handle escape character in parameter arguments in Python?

skript parameter: "C:\Ordner 1\" "D:\test 2\" As you can see the parameter arguments given above are two paths ... if len(sys.argv) > 1: print(sys.argv[1]) print(...
JKR's user avatar
  • 49
0 votes
3 answers
28 views

Need to return 5th and 6th value after ^ in oracle string [duplicate]

need to return 305 and 2000 ( 5th and 6th value after ^ symbol ) from string 1^1^1^C^15^305^2000^yes in oracle example String : 1^1^1^C^15^305^2000^yes o/p: 305 , 2000 in separate columns. its like ...
Sathish Kumar's user avatar
3 votes
1 answer
43 views

Using `grepl` on Hex characters and escaped unicode non-ASCII characters with `stringi::stri_escape_unicode()`

Old question I have an R package in which I have a list of university names that I want to match to the user input. The list of names contains special characters and this is generating a warning in R ...
rempsyc's user avatar
  • 825
0 votes
0 answers
31 views

String literal with an escape sequence followed by a digit [duplicate]

I need to represent an arbitrary sequence of bytes as a C++ string literal, but in the typical case where it is mostly an ASCII string, keep it as readable as reasonably possible. The obvious way to ...
rwallace's user avatar
  • 31.5k
0 votes
1 answer
55 views

Escaping special characters in Ballerina

I need to define a MembershipStatus Enum as depicted below. public enum MembershipStatus { INVITED, REGISTERED, DEACTIVATED, RE-INVITED } It says operator '-' not defined for '...
Malintha Ranasinghe's user avatar
-1 votes
0 answers
43 views

C# string array join to escaped string (like ArgumentList)?

I do not use C# often, however, I need to modify some code, which uses: Process new_process = new Process(); new_process.StartInfo.FileName = "mytool.exe"; Now, I have to make a call, ...
sdbbs's user avatar
  • 4,308
0 votes
0 answers
17 views

How to properly decode and unescape text in Node and the browser?

I am parsing a binary file to extract the text. It mostly works, however certain letters that should be accented have a garbled encoding. For example I get Señor instead of Señor, or salvación ...
Chris Barr's user avatar
  • 30.2k
0 votes
1 answer
49 views

rsyslog mmextenal logstash json output with escaped quotations and additional quotations

I'm having an issue with getting rsyslog to generate the correct format for logstash. I'm receiving remote rsyslog messages (using RELP) and I'm then processing those messages using some bespoke code ...
Sean Lennon's user avatar
0 votes
0 answers
12 views

Is it possible to paste with line breaks (and escaped text) in WebStorm?

I've got some logging that has a SQL query in it: WITH customer_orders AS (\n... id, \"name\", I'm certain in the past I've pasted text like that into WebStorm and gotten a result like: ...
jcollum's user avatar
  • 43.7k
0 votes
1 answer
36 views

Pug - Is there a way to get the output markup from a pug mixin as a escaped markup?

The idea is to have the possibility to use the same mixin used to build some componet for a project also to get the html output to use inside <code> tags to build a small documetation. So here I ...
spazione's user avatar
0 votes
0 answers
28 views

VBA escape single quote to allow variable with apostrophe in filter string expression

I'm applying a filter to a recordset. The filter contains a variable that may contain an apostrophe. The filter works until a variable value contains an apostrophe. I've tried replacing the single ...
Prattdakota's user avatar
0 votes
1 answer
36 views

Get escaped " (&quote;) and ' (&apos;) chars in xml output after xsl transformation

I need to escape " and ' in an xml file to &quot; &apos; using XSLT 1.0 due to that the consuming system cannot handle these characters inside an xml element. I've run into two issues ...
rast's user avatar
  • 3
0 votes
0 answers
18 views

databricks / spark - escape character in column value \ - splitting column

Having a very frustrating time trying trying to get spark not to split my column when it has a \ in the column value. what do I need to adjust to do this. Not getting it thank you :) datapath = "...
Vanessa van gelder's user avatar
0 votes
1 answer
19 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 ...
Avraham Cohen's user avatar
0 votes
0 answers
65 views

Unable to get escape syntax to work in github actions on powershell

PS C:\Users\sshuser_App\Downloads> ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q -t -i C:\Users\sshuser\.ssh\id_rsa_tmp sshuser@dbhost First, The above ssh command works fine ...
Ashar's user avatar
  • 2,950
0 votes
1 answer
32 views

Postgresql backslash escape character not working for commas in COPY FROM

Postgresql backslash escape character not working for escaping a comma delimiter in COPY FROM csv file. I am using Postgresql version 12. I have tried this: COPY myTable FROM '/tmp/myTest.csv' ...
Guasqueño's user avatar
0 votes
1 answer
68 views

How to assign output of a complicated shell command to variable in Jinja in a Salt State

I'm writing a Salt state where I have this shell command: /path/to/directory/java/bin/./java -version 2>&1 | awk -F'java version' '{print $1}' | awk -F'\.' '{print $2; exit}'| tr -d '"' ...
TorusWithSprinkles's user avatar
0 votes
1 answer
42 views

Holding `jj` leaves inserted `j` character in Neovim

I'm trying to map jj to <Esc> but it's not working as expected. I've tried adding these to keymaps in my init.lua, but it's not behaving as expected: vim.keymap.set('i', 'jj', '<Esc>', { ...
currenthandle's user avatar
1 vote
3 answers
55 views

Escape URL with perl but reserved character is not working

I was trying to use bash, but it seems some package installation is required, so I want to give Perl a try and hope to use a clean and only one command to achieve it. Example code: #!/usr/bin/perl use ...
Eric's user avatar
  • 732
0 votes
0 answers
17 views

Syslog-ng how to escape all data inside ${MESSAGE}, i need to send it to http endpoint as json

i need to send all received syslog message as an json payload. syslog entry it self contains double quotes and other special chars, that ruins my json payload, any idea how it can automatically escape ...
porlock's user avatar
2 votes
3 answers
54 views

How to escape sharp(#) symbol in path?

I'm trying to get absolute path from string. Everything worked fine before i met path that contains sparp(#) symbol. Here is my example: class Program { static void Main(string[] args) ...
Kliver Max's user avatar
  • 5,127
-1 votes
1 answer
53 views

How to assign a variable string with single quotes to Jinja2

I receive a json payload like below: { "address": { "summary": "my home's address" } } I have a JSON with jinja template: { "parent_elem&...
ankur jain's user avatar
1 vote
1 answer
34 views

Escaping $_ in powershell inside python

Can you please tell me why the dollar sign output does not work? I used this construction: commands = ( f'powershell.exe -noprofile -command "&Get-ADUser -Filter (\\"OfficePhone -...
Norbert  Yuhas's user avatar
0 votes
0 answers
32 views

Python regex why it takes 4 backslashes to get one backslash? [duplicate]

I am using the library re import re, and I have a string that in human readable format (if you were to find it on a printed book and you see it with your eyes) looks like this: \t It is not a tab, it'...
Eugenio.Gastelum96's user avatar
0 votes
3 answers
48 views

Why my javascript code work, but only once?

In my code, the rectangle should hide when I click on it and appear when I press Esc. Everything works only once. Why? And how can I solve this problem? Thank you for your attention. const myBtn = ...
Kira Dresst's user avatar
1 vote
2 answers
39 views

how to handle quotes on using javascript eval

var userString = `var a='sister\'s'` eval(userString) //error I will get the user string and do eval, it throws parse error since the string is escaped. How to eval it properly , i saw we can ,make ...
MOHAMED SIKKANDAR AFZAL M's user avatar
0 votes
2 answers
63 views

Print single and double quotes in Ruby [duplicate]

Trying to print a word inside single and double quotes. So I want to print something like ' "That's my word" ' I want that the single and double quote get printed. But not sure how to do it ...
pralxx's user avatar
  • 65
1 vote
2 answers
96 views

powershell oneliner inside of batch loop

I have following loop: for /f "tokens=1-3 delims=- " %%a in (' powershell.exe -Command "Get-EventLog -ErrorAction SilentlyContinue -Newest 1 -LogName System -EntryType Error -Source ...
user2956477's user avatar
  • 1,210
1 vote
3 answers
52 views

PowerShell: How can I remove a literal "\n" from a string and replace with actual newline

I have a string like this: hello\nworld where the \n is not symbolic for a newline but is literal. How to I change that string to have an actual newline?
Kevin Buchs's user avatar
  • 2,520
1 vote
0 answers
41 views

can go mod edit -replace escape "@"

I don't know how to scape the @ character on a go mod edit command when executing go mod edit -replace=some/package-name=./folder/@folder/package-folder the resulting go.mod is broken due to the '@' ...
Dany's user avatar
  • 19
1 vote
1 answer
57 views

Memory representation of ASCII control codes in R

If I write a <- "\n" in R, what does R store in memory? Does it store 0x0A (line feed character), or does it store 0x5C6E (literal \n)? Said otherwise, is cat that returns the string as ...
robertspierre's user avatar
0 votes
1 answer
33 views

wrong escaping of request url by aiohttp

aiohttp e.g: import asyncio import aiohttp async def main(): async with aiohttp.ClientSession() as session: async with asyncio.TaskGroup() as tg: async with session.get('http://...
user13082750's user avatar
1 vote
2 answers
78 views

How to escape pipes in Maven argument string in Powershell

I am trying to make the following command work in Powershell: mvn -Dhttp.nonProxyHosts='xxx.xxx.*|*.example.com|*.example2.com|localhost|127.0.0.1' -DskipTests clean install This command works fine ...
CloudWatcher's user avatar
-1 votes
1 answer
31 views

In emacs org mode Latex, tyring to use % but I got \%

I am trying create a latex document from org mode, and want to use % for comment out line, and {} for grouping, but org-mode output is % , { }. How can I output without "" escape character ? ...
user1389406's user avatar
0 votes
0 answers
56 views

PowerShell script - escaping quotes in a csv file

I'm working with a script that opens up a csv, splits it into multiple smaller csvs than compresses the files so they can be easily uploaded. The script does a fine job at this, but I need a way to ...
PracticingPython's user avatar
0 votes
1 answer
30 views

Python replacing "\" character twice replace funtion [duplicate]

I have text for fuzzy searching where user gives text, and I replace with characters used for regex parsing later. Here is the text saved in configuration_blocks variable: neighbor 10.1.(()).(()) ...
hfakoor222's user avatar
0 votes
2 answers
25 views

Path is not found after joining

I have made a function for downloading images to a specific folder def get_images(folder_path): for urls in list_of_urls: for url in urls: response = requests.get(url) ...
Ron Kieftenbeld's user avatar
1 vote
2 answers
51 views

How to unambiguously quote when printing all args passed to a bash function? But taking care to quote special characters, avoid using the backslash?

Basically I need a shell function called echo_Q (or an echo -Q option), than will echo a quoted argument list, while "[nicely]" strictly avoiding any backslash-quoting on any of the ...
NevilleDNZ's user avatar
  • 1,269
0 votes
2 answers
150 views

Handle escape sequences in C#

I have a C# endpoint that takes rawText as string input. The input is send after converting a file to string using 3rd party aspose library, input that is sent is of following format, eg - {rawText = &...
s_v's user avatar
  • 132
1 vote
1 answer
47 views

Python escape quotes in a given string variable

I have to run a command in the command line that is structured as follows: "C:/..." --input="{THE INPUT}" My problem is that the input is code and therefore contains quotes. ...
max245905's user avatar
0 votes
0 answers
26 views

Escape Azure Pipeline

I have a problem with an escape in Azure Pipeline. This is the line with I'm having the problem: cmd="sfdx force:org:create --targetdevhubusername DevHub --wait 10 --durationdays 1 --...
ximo12's user avatar
  • 147
-1 votes
2 answers
42 views

How to find in postgres strings like %'%

I need to search in my column strings which contains ' select * from app_user au where au.last_name like '%'%' but something like that gives me SQL Error [42601]: Unterminated string literal started ...
mtmx's user avatar
  • 827
1 vote
3 answers
46 views

Quanteda and stringr in R: (Correct) regex cannot be parsed

I want to run a regex search using the quanteda and stringr libraries, but I continue to receive errors. My goal is to match the patterns (VP (V.. ...) using the regex \(VP\h+\(V\w*\h+\w*\). Here is a ...
Serendipity's user avatar

1
2 3 4 5
179