You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2018. It is now read-only.
It would be really useful to be able to test out the regex on sample data as well. E.g., for a regex of "\d+", perhaps I might throw the following sample data at it:
"a"
""
"0"
"235"
"aslfj235"
A really cool thing to do with this would be to highlight the path through the state machine that is taken when evaluating a piece of sample data.
The text was updated successfully, but these errors were encountered:
I don't expect this feature will be added in the near future, but I'm going to keep it around since it does sound like a good idea.
At this point, the expression is not being compiled into a state machine, it is merely being parsed enough to render the image. I haven't done any research into generating the state machine, or the difficulties that may be encountered with tracing the path through that machine, but from past reading I understand that it is not a trivial problem.
One simplistic way to implement this is to run client-side JS that executes the regex against a given string, rather than processing it via the state machine representation.
There are a few other regex demo sites on the web, and I think they just do the above. Might as well eat their lunch and win their users by gaining their features!!
I'm intending to go down that route initially for http://regexplained.co.uk but it does have the downside of not being able to see the path taken through the railroad diagram.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It would be really useful to be able to test out the regex on sample data as well. E.g., for a regex of "\d+", perhaps I might throw the following sample data at it:
"a"
""
"0"
"235"
"aslfj235"
A really cool thing to do with this would be to highlight the path through the state machine that is taken when evaluating a piece of sample data.
The text was updated successfully, but these errors were encountered: