Skip to main content
0 votes
1 answer
38 views

How to prevent unescaped program arguments

This test program parses a single text argument, which could be a URL: #!/usr/bin/env python import argparse def parse_input(): parser = argparse.ArgumentParser( description='Program ...
Mister Smith's user avatar
  • 28.2k
3 votes
3 answers
79 views

regex to match all unescaped '$' in a regex string

I want to build a regex that will match all unescaped $ in strings that represents a regex. In this case, a character is unescaped if it contains an equal number of backslashes behind it (each pair of ...
Benny Brudner's user avatar
-2 votes
0 answers
59 views

How to use code (`(?{ ... })`) in right side of substitute? [duplicate]

I did some home-grown escaping and un-escaping of space characters in perl 5.26.1, but it does not work as expected: I escape characters using $c = "\001" . sprintf('%002x', ord($c)), and my ...
U. Windl's user avatar
  • 4,489
0 votes
0 answers
57 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(...
Mikel91's user avatar
0 votes
0 answers
40 views

Why does \t produce different numbers of spaces in Python output? [duplicate]

In this code I use \t as tab but in one of them the out put has 8 spaces and in one of them the out put has 7 spaces instead tab(\t) how python calculate this how should we know how many spaces we ...
Mikel91's user avatar
0 votes
1 answer
63 views

How do I use the printf command with a format string beginning with "-"? [duplicate]

I have some items: items=(one two three) And I want to print them with leading -, to give this output: - one - two - three The obvious format string fails: printf '- %s\n' "${items[@]}" ...
Toby Speight's user avatar
  • 31.4k
1 vote
1 answer
64 views

Powershell escape in LUA script

Trying to kill some child processes (given parent pid) from within a lua script. Found solution using wmic but prefer using powershell. I can run each of these powershell commands in a standard ...
dtmland's user avatar
  • 2,238
-4 votes
1 answer
102 views

How to pass raw JSON with spaces and tabs to a struct in Go without extra escaping or marshaling

I'm working with a Go application where I need to pass raw JSON data to a struct field, but I am encountering issues with extra escaping when marshaling the struct, especially when the raw JSON ...
Sparsh's user avatar
  • 1
0 votes
1 answer
57 views

Can't Query AWS Athena Presto Table Because of Dash Character in Column name

I have a file in S3 with the following contents: {"foo-bar": {"name":"Mercury","distanceFromSun":0.39,"orbitalPeriod":0.24,"dayLength":58.65}...
Samer A.'s user avatar
-3 votes
1 answer
52 views

Using special characters in a Django template tags

I am trying to make a field with Django Tweaks and I am trying to add some HTMX attributes. I want to use the following syntax: {% render_field field <other attributes> hx-vals='{"country&...
TeaDrinkingProgrammer's user avatar
0 votes
0 answers
50 views

Dbeaver Generate SQL function adds unwanted escape characters

Often I want to make copies of a report in my reports table for some small modifications. Then I always query the report I want to copy select * from reports where id = 1 After that I right click on ...
user2210516's user avatar
1 vote
2 answers
104 views

Mixing \e and other escape characters

I recently came to know how ANSI-C quoted strings can be used to give colourful prompts to commands that do not recognize escape characters. For e.g. % read -q $'val? \e[31mFoobar\e[0m:' ...
Dhruv's user avatar
  • 479
1 vote
1 answer
47 views

sql escape sequence "\_", leetcode problem 1517

Problem: To find valid e-mail. A valid e-mail has a prefix name and a domain where: The prefix name is a string that may contain letters (upper or lower case), digits, underscore '_', period '.', and/...
Gorang's user avatar
  • 13
-1 votes
1 answer
52 views

Disable escaping XML text passed through command line

General overview I have a part of a XML file that comes from outside the XML (or the xslt itself) cause it's dynamically generated by another process. So I give it through the command line. The ...
fauve's user avatar
  • 269
0 votes
0 answers
35 views

Error: Unable to parse JSON, Kotlin REST Json Payload contains escaped double quotes

I am facing one issue. The application is Kotlin + Java. I am calling a Kotlin REST Resource passing the escaped backslash in the payload (This request is coming from external client). but I am ...
Harish Pal's user avatar

15 30 50 per page
1
2 3 4 5
605