开发者

How can I generate strings that satisfy some restrictions?

Can anyone give me a hand with techniques to generate strings that satisfy certain restrictions.

For example, say I need to generate strings s and t such that

      length(s) < length(t)
      length(t) > 12
      t contains at least 3 capital letters
and   s contains a 2

And I don't mean this particular开发者_如何学Python example but some generic techniques to generate strings that satisfy certain conditions.


Check this: Random string that matches a regexp

for good discussion and ideas. Thanks! Manuel

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜