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 :b:

Thanks,
R. Singh

8 Likes

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.

1 Like

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:

^[0-9A-Z[:space:]]
^[[:alpha:]]

--
Never mind, this site is about Javascript regex only, which does not support POSIX character classes..

3 Likes

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...

1 Like