Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate test data from a REGEX

Tags:

c#

regex

random

Folks,

Does anyone know of a dll or .net code that will generate test data from a REGEX?

I am aware of The Regular Expression Generator and the solutions offered in the stackoverflow question Using Regex to generate Strings rather than match them.

Unfortunately, I am writing in C#, and I need to generate the test data at run time.

I have also tried Rex, but it blows an error when I try to load it on a virtual machine.

Any help would be appreciated.

Regards,

Brett Nieland

like image 430
bnieland Avatar asked Dec 11 '10 19:12

bnieland


People also ask

What is regex generator?

"Regex Generator is a simple web interface to generate regular expressions from a set of strings."

What does (? I do in regex?

(? i) makes the regex case insensitive. (? c) makes the regex case sensitive.

What is regex tester?

Regex Tester is a tool to learn, build, & test Regular Expressions (RegEx / RegExp). Results update in real-time as you type. Roll over a match or expression for details. Save & share expressions with others. Explore the Library for help & examples.

Can you Google with regex?

Google Search Console has introduced the use of regular expression to filter results in the performance report. Using the custom filter option at the top of the performance report, you can apply a filter with regex using the Custom (regex) dropdown option.


1 Answers

There is a Microsoft reasearch tool called Rex that explores .NET regexes and generates members efficiently. http://research.microsoft.com/en-us/projects/rex/

As I have seen, you already tried Rex: Maybe the blog post from Chris Eargle helps you then.

like image 155
Martin Buberl Avatar answered Oct 15 '22 04:10

Martin Buberl