Rex: Regular Expression Exploration for .NET

  • Others

I think you can imagine I'm not going to talk about the police dog…

Rex is a utility designed by a team of Microsoft Research. It allows to generate strings that match a regular expression. Results can be saved to a file for easy use. An example of use:

> rex.exe "^[a-z]+$" /k:10 /file:toto.txt
  • /k:10 generates 10 results
  • /file:toto.txt save results to a file

For instance, here's the generated strings:

d
ux
gxh
k
lo
ze
m
jvl
u
som

Rex makes it very convenient to generate data for testing. In addition it is a .NET executable file, so it is possible to use it in your own applications.

http://research.microsoft.com/en-us/projects/rex/

Do you have a question or a suggestion about this post? Contact me on Twitter or by email!

Follow me:
Enjoy this blog?Buy Me A CoffeeDonate with PayPal