Regex to random string
正規表現
からマッチする文字列を生成する
RandExp
シリーズがあるようす
ただし言語によってはメンテナンスされていない
Ruby
https://github.com/benburkert/randexp
JS
https://github.com/fent/randexp.js
Ruby
Faker::Base.regexify
簡易実装のため精度は期待しないほうが良さそう
https://github.com/tom-lord/regexp-examples
自前
parser
で頑張っているが
https://github.com/ammar/regexp_parser
を使ったほうが精度が高そう
https://github.com/tom-lord/regexp-examples/issues/35
Routing specs自動生成
するroute_mechanicでの利用例
ライブラリの利用者が定義したRegexにマッチするpathを自動生成するために利用している
https://github.com/ohbarye/route_mechanic/blob/cfcec96dd1544ea40dd7a6b41da201f0e64a4ebf/lib/route_mechanic/testing/methods.rb#L50