"Invert" regular expression matching

Steven Taschuk staschuk at telusplanet.net
Wed Jun 18 17:38:47 CEST 2003


Quoth Martin Krallinger:
> I would be pleased  if anyone has allready developed a python
> program / module to "invert" regular expressions.
  [...]
> , (which )?(is )?required (for|to|in)
  [...]
> , which is required for
> , is required for
> , which is required in
> etc,.........
  [...]

I don't know of anything which does exactly that, but you might be
able to adapt Jeff Epler's Novelwriting tool to your purposes:
    <http://unpythonic.net/~jepler/novelwriting/index.html>
(It generates random text matching a user-specified grammar.)

-- 
Steven Taschuk                            staschuk at telusplanet.net
Every public frenzy produces legislation purporting to address it.
                                                  (Kinsley's Law)





More information about the Python-list mailing list