Hacker News new | ask | show | jobs
by grogenaut 3275 days ago
Not to make light of your library, but what I'm really looking, and have found most useful, is a go version of Xeger (https://code.google.com/archive/p/xeger/)(regex backwards). Basically you define a regex and xeger generates random strings that match that pattern. There's a newer lib in java as well called generex (https://github.com/mifmif/Generex).

These plus some hand written factory girl like code work well for me in Java. There are similar libs for C#. This lower level abstraction works for many many business cases, not just, you know, business software.

1 comments

ha. I had a repo I started a while back that I also called xeger that did exactly that: it reversed regex's. I thought the name was clever, but I guess not clever enough. Kudos to them for making something that works. I think I spent a few hours one night and did not get so far and have not revisited the idea in 2 or so years. Maybe I should look back into that...