Tagged Questions
0
votes
1answer
34 views
(e)grep and atomic grouping [comprehension question]
I am trying to understand the correct use of »atomic grouping« a.k.a. »independent subexpressions« a.k.a. »non-backtracking subpattern« [this are the terms I found ...
0
votes
2answers
85 views
what is “an invisible whitespace character that takes up space”
One can look up Unicode Characters with Regular Expressions. On Jan Goyvaerts website I found a RegExp whose meaning I don't understand :
\p{Zs} or \p{Space_Separator}: a whitespace character that ...
3
votes
2answers
92 views
greedy and lazy regular expressions (comprehension question)
I am teaching myself regular expressions, and I got stuck at »greedy« vs. »lazy« repeatings.
What I found out so far is that
»greedy« means that the RegExp ...
0
votes
3answers
121 views
Regular Expression for finding double characters in Bash
I am looking for a regular expression that finds all occurences of double characters in a text, a listing, etc. on the command line (Bash).
Main Question: Is there a simple way to look for sequences ...
3
votes
5answers
161 views
Regex match in CLI
Is there something like a logical for the cli? I want to achieve this
mv -t newfolder *.(png|jpg)
so that alls jpg and png files are moved into newfolder. I know it could be done with
mv -t ...
1
vote
2answers
256 views
How to find and replace files contents that match a pattern?
Suppose we have a folder named Project.
I would like find each file in the folder that contains the pattern &$
at the function call.
For example should replace:
AnyFunction(&$arg);
with
...
2
votes
2answers
508 views
regex replace text in xml file within node from the command line
I have an XML file and I would like to replace everything that is between the open and closing tag within multiple instances of the g:gtin node with nothing.
Is this possible from the command line, ...
5
votes
2answers
627 views
Number of backslashes needed for escaping regex backslash on the command-line
I recently had trouble with some regex on the command-line, and
found that for matching a backslash, different numbers of
characters can be used. This number depends on the quoting used for
the regex ...
4
votes
1answer
495 views
Is there a tool in linux that allows multi-line regex expressions?
I'm wanting to find the results of a multi-line regular expression in linux. I tried grep, but like most linux utilities it's line based.
Is there something similar that allows me to search across ...