I'm needing a way for users to specify the way that data is generated. For instance they might need to create a last name comprised of alpha characters and is 4-16 long. Or maybe an internal number that has to match "X\d{4}400".
My though was to write a reverse regex type thing. They could define the data with a regex and it would generate the data off it. Some aspects would not be supported such as +,*,?... mostly because they wouldn't make sense in the application. Primarily it would support (|), {x[,y]}, [], that kind of stuff. I know it's not regular expressions, but it's using that notation as a base.
Is this the wrong way to go about it? Honestly the users probably won't use anything super in depth as none of them know much about regex. However they do need to be somewhat specific in their data definitions and I felt this would be a way they could do that.
Just kinda doing a sanity check before I drive myself insane...
Heck there might already be an alternative library out there that does what I need... I just can't find one.
My though was to write a reverse regex type thing. They could define the data with a regex and it would generate the data off it. Some aspects would not be supported such as +,*,?... mostly because they wouldn't make sense in the application. Primarily it would support (|), {x[,y]}, [], that kind of stuff. I know it's not regular expressions, but it's using that notation as a base.
Is this the wrong way to go about it? Honestly the users probably won't use anything super in depth as none of them know much about regex. However they do need to be somewhat specific in their data definitions and I felt this would be a way they could do that.
Just kinda doing a sanity check before I drive myself insane...