Typically in our work we use regular expressions in capture or match operations.
However, regular expressions can be used - manually at least - to
Take a look at Xeger (Google Code).
The Visual Studio Team System appears to have an inverse regex generator, too, but it doesn't look like the algorithm is open source.