Comment

Comment by robomartin

Interesting concept. As with all regex related online tools, it is important to test exhaustively before trusting it.

Real-time character-by-character output would be important. If you are working on a long regex expression real-time output can help you think like the FSA and see how it behaves.

Here's an example of this tool failing:

    <a.*?>([^<]*)<\/a>
http://gskinner.com/RegExr/?339m7

or

http://rubular.com/r/pCXZs0DnSS

take your pick, same results.

If you remove the "?" from the regex you'll get different results.

One version selects all anchor tags individually and make a selection group of their contents and the other version ends-up selecting everything between the first opening anchor tag and the last closing anchor tag into the selection group except for "<" characters.

The graph in Regexper does not show any difference between the two expressions even when any one of these forms is used:

    #<a.*>([^<]*)</a>#msi
    
    #<a.*>([^<]*)</a>#gsi
    
    /<a.*>([^<]*)<\/a>/msi
    
    /<a.*>([^<]*)</a>/gsi
It looks like the flags are not being processed.

Also, please change the textbox to a fixed width font.

In addition to that, regex authoring tools, ultimately, are only useful if you can also enter some input text and see the result, preferably in real-time.

Other than that, it's an interesting concept.

parent robomartin 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton