3 ms·
Oh god, I've been wanting something like this for ages. I've always dreamed of a regex driven list generator, but where I can supply constraints on repetition o
by elblanco 16y ago
Oh god, I've been wanting something like this for ages. I've always dreamed of a regex driven list generator, but where I can supply constraints on repetition operators (*->{0,2}, +->{1,3}) to limit the scope, but then get a comprehensive list of all the matching strings.
Imagine using some rules to take something like a user driven entry, where they'll enter something like say...a phone number freetext, but then use some rules that turn that phone number into a regex that'll match many common ways to write that phone number, then generate all the possible matching versions of that phone number for submission against an indexed database of text documents to see if any match. It's a trivial example, but a similar concept could work for things like names that have been Romanized from a non-Latin alphabet....generate a regex to match some variants, then generate the variants and search an indexed database for those variants. It would be much much faster in many cases than scanning through all the documents with the regex.
- elblanco 16y agoNearly forgot this similar effort: http://research.microsoft.com/en-us/projects/rex/ http://research.microsoft.com/en-us/projects/rex/