Regarding a GREAT site for understanding and Visualizing regex patterns.
Hello All,
While googling on regex I came across a site named Regulex Regulex:JavaScript Regular Expression Visualizer
I have written a simple regex ^(a|b|c)([^@]*)@(.*) and could see its visualization; one could export it too, following is the screen shot.
It may help us for understanding regex expressions. I am also new to it and exploring it.
Thought to share on forums
Thanks,
R. Singh
Last edited by RavinderSingh13; 09-15-2019 at 01:30 PM..
These 8 Users Gave Thanks to RavinderSingh13 For This Post:
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
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.
The idea is neat I think, but it did not correctly interpret the first thing I threw at it.
It does not seem to like POSIX character classes:
--
Never mind, this site is about Javascript regex only, which does not support POSIX character classes..
Last edited by Scrutinizer; 09-16-2019 at 02:36 AM..
These 3 Users Gave Thanks to Scrutinizer For This Post:
Someone told me not that long ago that the next big thing in computing are Regular Expressions.
Not needing such things in what I do using computers I thought, "Why, surely it is AI?"
Then I joined here and seeing you guys using them gobsmacked me. I had no idea how important BREs and EREs were until coming on here.
However a tool like that makes them easy to understand.
(Whilst in Perl mode I will learn how to use Perl's REs.)
Thanks Ravinder, great find...
This User Gave Thanks to wisecracker For This Post:
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)
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)
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)
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)
# 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)
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)