【发布时间】:2014-03-18 19:58:33
【问题描述】:
我有正则表达式,例如 [ABC]、[A-Z]、[0-9]、[A-Z,0-9]、[^A-Z]。我可以从正则表达式模式生成一组字符吗? 谢谢。
编辑: 在爪哇。我发现http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/RandomStringUtils.htmlrandom(int count, String chars) 类存在用于生成随机代码。
但我需要使用正则表达式模式生成代码。
【问题讨论】: