Using REGEX in reverse?
Hi Community,
Has anyone written a 'reverse' Regular expression generator?
Normal REGEX takes a candidate textual string and checks that is conforms to some expression.
Has anyone generated test data by supplying a regular expression and returning some text that conforms to said input regular expression?
May have to return a DATASET of text as with ORs (|) there are multiple paths through the regular expression.
Weird question perhaps, well I'll just put it out there.
Yours
Allan
Has anyone written a 'reverse' Regular expression generator?
Normal REGEX takes a candidate textual string and checks that is conforms to some expression.
Has anyone generated test data by supplying a regular expression and returning some text that conforms to said input regular expression?
May have to return a DATASET of text as with ORs (|) there are multiple paths through the regular expression.
Weird question perhaps, well I'll just put it out there.
Yours
Allan
- Allan
- Posts: 444
- Joined: Sat Oct 01, 2011 7:26 pm
Allan,
No, I've never heard of any code that generates test data from RegEx.
I did write a pretty complex test data generator a while back that I could let you have a look at to see if it might meet your needs. PM me if you're interested.
HTH,
Richard
No, I've never heard of any code that generates test data from RegEx.
I did write a pretty complex test data generator a while back that I could let you have a look at to see if it might meet your needs. PM me if you're interested.
HTH,
Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
No, it's ok Richard. As I said it's a wacky idea, but intriguing.
If one could do it, it would make generating test data SSSSSOOOOO much easier.
Cheers
Allan
If one could do it, it would make generating test data SSSSSOOOOO much easier.
Cheers
Allan
- Allan
- Posts: 444
- Joined: Sat Oct 01, 2011 7:26 pm
Richard,
Your comment:
I did write a pretty complex test data generator a while back that I could let you have a look
This is precisely the job assigned to me!
I never like re-inventing the wheel, unfortunately I've gone a fare way down my implementation route, (which also has to service as a validator of incoming test data).
I'll ping you the proposal I'm working to. (needs updating ha ha).
Cheers
Allan
Your comment:
I did write a pretty complex test data generator a while back that I could let you have a look
This is precisely the job assigned to me!
I never like re-inventing the wheel, unfortunately I've gone a fare way down my implementation route, (which also has to service as a validator of incoming test data).
I'll ping you the proposal I'm working to. (needs updating ha ha).
Cheers
Allan
- Allan
- Posts: 444
- Joined: Sat Oct 01, 2011 7:26 pm
Allan,
I emailed you a .mod file containing my test data generator code. I built a pretty generic system where the only requirements were to be able to generate any number records with any number of fields of any simple data type, with or without a standard distribution curve for the generated data (Gaussian, random, Pareto, etc.). An additional challenge was to make the "random" data duplicable.
HTH,
Richard
I emailed you a .mod file containing my test data generator code. I built a pretty generic system where the only requirements were to be able to generate any number records with any number of fields of any simple data type, with or without a standard distribution curve for the generated data (Gaussian, random, Pareto, etc.). An additional challenge was to make the "random" data duplicable.
HTH,
Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest