All Questions
4
questions
4
votes
3
answers
15k
views
How can search for both single quotes and double quotes in a grep search?
When I do a search bindkey in the zsh plugins directory for key conflicts I get responses from both the .zsh script files and .md files, and some of the zsh readme files use a double quote in the ...
3
votes
2
answers
2k
views
How to escape metacharacters for egrep like metaquote from Perl?
Perl has a function called metaquote() to escape all special characters for a regular expression.
Is there an equivalent technique for egrep?
Example: If I am searching for the string abc.def.ghi, I ...
4
votes
1
answer
1k
views
Match pattern \\\" using grep
I have a json string inside json. This got encoded multiple times and I ended up with many escape backlashes: \\\".
The much shortened string looks like,
'[{"testId" : "12345", "message": "\\\"the ...
17
votes
2
answers
24k
views
Why do I have to escape a "dot" twice?
I know that we can escape a special character like *(){}$ with \ so as to be considered literals.
For example \* or \$
But in case of . I have to do it twice, like \\. otherwise it is considered ...