Re:Show HN: my regular expression example match generator
by abecedarius on Friday September 24, 2010 @07:05PM
(#1725736)
Since the intersection of two regular languages is a regular language, you could reduce generating 'background language' example matches to taking intersections. It's unfortunate how rare it is for libraries to provide you that operation.
(Same thing for HTML: intersecting a regular language with a context-free one is context-free.)
Re:Show HN: my regular expression example match generator
by nerfhammer on Friday September 24, 2010 @07:01PM
(#1725726)
you support . which seems to pick random ascii characters
Likewise, I imagine it might be useful to specify some background language that matches should be taken from. That is, you might want to tell it to show you example matches made from snippets of valid html, from email-style English text, ascii-only strings, arbitrary unicode, etc. Incorporating this kind requires a lot of original thinking about usability (and some prototyping to figure out what would even make sense).