09-16-2019
Thanks Ravinder,
I generally use various online REGEX checkers when when I am writing REGEX expressions, mostly REGEX for PHP code.
This is the first one I have seen that has the "visualization" done like this, thanks for sharing.
The REGEX checkers I like the best have always been the ones where we can cut-and-paste our text into the checker and then see
the resulting matches so we can easily test the input versus the output when debugging.
Next time I need a REGEX I will also try this visualization tool.
Thanks for sharing.
This User Gave Thanks to Neo For This Post:
6 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Please help me to understand the bold segments in the below regex.
Both are of same type whose meaning I am looking for.
find . \( -iregex './\{6,10\}./src' \) -type d -maxdepth 2
Output:
./20111210.0/src
In continuation to above:
sed -e 's|./\(*.\{1,3\}\).*|\1|g'
Output: ... (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies
2. Shell Programming and Scripting
# echo "Teest string" | sed 's/e*/=>replaced=</'
=>replaced<=Teest string
So, in the above code , sed replaces at the start. does that mean sed using the pattern e* settles to zero occurence ? Why sed was not able to replace Teest string.
# echo "Teest string" | sed 's/e*//g'
Tst string
... (6 Replies)
Discussion started by: chidori
6 Replies
3. Shell Programming and Scripting
can someone please confirm for me if i'm right:
the pattern:
ORA-0*(600?|7445|4)
can someone give me an idea of all the entries the pattern above will grab from a database log file?
is it looking for the following strings?:
ORA-0600
ORA-7445
4) (2 Replies)
Discussion started by: SkySmart
2 Replies
4. Shell Programming and Scripting
Hi Guys,
Could you please kindly explain what exactly the below SED command will do ?
I am quite confused and i assumed that,
sed 's/*$/ /'
1. It will remove tab and extra spaces .. with single space.
The issue is if it is removing tab then it should be Î right ..
please assist.... (3 Replies)
Discussion started by: Nandy
3 Replies
5. Shell Programming and Scripting
Hi everyone,
This regex looks simple and yet it doesn't make sense how it's manipulating the output.
ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0c:49:c2:35:6v
inet addr:192.16.1.1 Bcast:192.168.226.255 Mask:255.255.255.0
inet6 addr:... (2 Replies)
Discussion started by: xcod3r
2 Replies
6. What is on Your Mind?
Our team just published this technical report on ResearchGate:
Virtualized Cyberspace - Visualizing Patterns & Anomalies for Cognitive Cyber Situational Awareness
ABSTRACT
ACKNOWLEDGMENTS
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License This... (0 Replies)
Discussion started by: Neo
0 Replies
LEARN ABOUT REDHAT
grepdiff
GREPDIFF(1) GREPDIFF(1)
NAME
grepdiff - show files modified by a diff containing a regex
SYNOPSIS
grepdiff [-n] [-p n] [--strip=n] [--addprefix=PREFIX] [-s] [-i PATTERN] [-x PATTERN] {REGEX} [file...]
grepdiff {--help | --version | --list | --filter ...}
DESCRIPTION
For each file modified by a patch, if the patch hunk contains the REGEX then the file's name is printed.
The regular expression is treated as POSIX Basic Regular Expression syntax.
For example, to see the patches in my.patch which contain the regular expression ``pf_gfp_mask'', use:
grepdiff pf_gfp_mask my.patch |
xargs -rn1 filterdiff my.patch -i
You can use both unified and context format diffs with this program.
OPTIONS
-n Display the line number that each patch begins at.
-p n When matching, ignore the first n components of the pathname.
--strip=n
Remove the first n components of the pathname before displaying it.
--addprefix=PREFIX
Prefix the pathname with PREFIX before displaying it.
-s Show file additions, modifications and removals. A file addition is indicated by a ``+'', a removal by a ``-'', and a modification
by a ``!''.
-i PATTERN
Include only files matching PATTERN.
-x PATTERN
Exclude files matching PATTERN.
--help Display a short usage message.
--version
Display the version number of grepdiff.
--filter
Behave like filterdiff(1) instead.
--list Behave like lsdiff(1) instead.
SEE ALSO
filterdiff(1), lsdiff(1)
AUTHOR
Tim Waugh <twaugh@redhat.com>.
patchutils 10 May 2002 GREPDIFF(1)