regexp sample 一个非常有限的Regexp#sample方法
正则表达式示例一个非常有限的 Regexp#sample 方法。
安装 $ gem install regexp_sample
用法:
require \"regexp_sample\"
using RegexpSample
/[a-z0-9]{5}/.sample
#=> \"nt3r6\"
/app[0-9]{5}/.sample(2)
#=> [\"app94832\", \"app04535\"]
版权版权所有 (C) 2014 文森特·奥利维尔。有关详细信息,请参阅许可证。
下载地址
用户评论