javallone/regexper

Render the "greedy"-ness of repetitions

Closed this issue · 2 comments

Don't know how to express this visually yet, but expressions that use a non-greedy repetition (*?, +?, ??, {x,y}?) should be rendered to indicate that the repetition is not greedy.

Just asked myself this question :)
I think this could be done with the color of the loop below the item; for instance, greedy match should have a red line color, and non-greedy could stay black, or something along those lines.

A legend below could explain that.

Greedyness of the expression is displayed in the regexper rewrite that just went live. Code is available on https://github.com/javallone/regexper-static