3

Or "How can I RegEx in reverse?"

specifically I want to take a regex such as wks[0-9][0-9][0-9]

and create a list such as wks001,wks002,wks003, etc

I know the easiest way in this example would be to simply increment the number through addition, but say I want it to be even more sophisticated later on such as [0-9abc] I'd like to use a more sophisticated tool.

preferable would be some windows capable scripting tech, such as vbscript/powershell but I'm open to other alternatives. I guess I kind of thought this might be something that is done all the time by random number generators and such and would be a programming staple, but I lack the understanding to phrase it correctly I think.

Brink
  • 67
  • 5
  • Yes this is indeed a duplicate. [Using Regex to generate Strings rather than match them](http://stackoverflow.com/q/22115/62576) provides a link to a library for this. Both the wrapper and the underlying automaton library are open source so it's a great place to start if you want to learn how this would be implemented. – Ma3x Jul 12 '13 at 23:38
  • It's definitely in line with the first thread, and I had found that and groaned when it was in java, but seems to be my best bet, thanks. – Brink Jul 12 '13 at 23:39
  • One person [answered with C#](http://stackoverflow.com/a/412989/707111), if you find that easier to read. – Ry- Jul 13 '13 at 15:18

0 Answers0