Relative Content

Tag Archive for regexruby

Regex: Capture only matching alternative in Ruby

I am cracking my head open with this:
I want to create passwords based on patterns. In those patterns I want to have repeating parts like a{3} => aaa, (ab){3} => ababab or [ab]{3} => aba or aaa or bbb etc..

Regex: Capture only matching alternative inn Ruby

I am cracking my head open with this:
I want to create passwords based on patterns. In those patterns I want to have repeating parts like a{3} => aaa, (ab){3} => ababab or [ab]{3} => aba or aaa or bbb etc..