Category "escaping"

R: Match an odd number of repetitions

I would like to match a string like \code, but not when the backslash is escaped. I think that one way of doing this could be matching an odd number of backslas

escaping newlines in sed replacement string

Here are my attempts to replace a b character with a newline using sed while running bash $> echo 'abc' | sed 's/b/\n/' anc no, that's not it $> echo

SQL syntax problem-- escaping single quote and percentage sign

I am trying to do an online course on Cybersecurity and one of the problems is trying to preform an sql injection. I have not been able to figure it out because

How to check if String should be escaped in Java

I want to check if a specific String should be escaped before really performing any escaping mechanism. for example: if the String is "msg\t" so I want to escap

preg_replace vs ereg_replace vs str_replace On This Particular Case

Using PHP, I want to generate custom MySQL dump file (due to cannot use exec and a few other reasons). I found these 2 similar solutions: https://www.kvcodes.co

What is the best practice using KQL to filter desired attack signature over (web)logs?

Recently I'm experimenting with logstach and Kibana on top of elastic over (web-)server logs. I tried to extract some attack signature like XSS & SQL inject

Unescape a string in NodeJS

I have an input which is: %u05D0%u05DC%20%u05E2%u05DC When I run the built-in browser function (on the console for example): unescape("%u05D0%u05DC%20%u05E2%u0

How to dynamically add escape character for any character in javascript?

I have got p element with some text. In this text in HTML code I use some "escape" characters like \n, \?, \t, etc. When I get the string in JS code, it is trea

Escape special characters in Prometheus metric names?

When exposing Prometheus metrics from a legacy application, I find that some metrics contain invalid characters such as my.metric, my-metric, my:metric Instead

Escape control characters in XML 1.0

I understand why control characters are illegal in XML 1.0, but still I need to store them somehow in XML payload and I cannot find any recommendations about es

Why does printf behave differently when called from a Makefile?

The printf program can be used to print binary data, e.g.: $ printf '%b' '\xff\xff' �� If I put this in a Makefile on its own, it works the same:

java program to print array element when index is entered by user

Forgive me if my question is stupid, I am a beginner, I found some Java code in which html components and some data were encoded and stored in array as string..

How to escape a whole sql string instead of escaping each argument?

I use https://github.com/mysqljs/mysql.git library. I have a mysql db query architecture in which I can not modify the SQL query file one by one to escape each

How do you escape a '@' symbol within in a url with razor

I know this is probably going to be something very simple and it is like just a 'gotcha' that I have yet to get; however, I have been struggling with escaping t

prevent escape string c#

I have my sql query which displays fields using "where" from a variable. I have my variable passed from a function string empCode which value is "!\\(" Here's

How do I escape parenthesis within a CONTAINS using T-SQL?

I want to have the following query: SELECT COUNT(*) FROM MyTable WHERE CONTAINS (MyField, '(429)') The problem, is that the parenthesis are ignored and it is

How do I escape a series of backslashes in a bash printf?

The following script yielded an unexpected output: printf "escaped slash: \\ \n" printf "2 escaped slashes: \\\\ \n" printf "3 escaped slashes: \\\\\\ \n" prin

Use a variable's value in a sed command [duplicate]

I can't seem to use a variable in a sed command, for example: sed "24s/.*/"$ct_tname"/" file1.sas > file2.sas I want $ct_tname the varia

What is the correct way to force JSON.Net to escape forward slash (solidus) characters?

So for business reasons I need to force JSON.NET to escape a JSON blob like so: { url: 'http://some.uri/endpoint' } As { "url": "http:\/\/some.uri\/endpoint