This package is a Haskell port of String_random.js library. There are implementations of Perl, golang, and Java as implementations of other languages.
{-# LANGUAGE OverloadedStrings #-} import Text.StringRandom main = do ymd <- stringRandomIO "20\\d\\d-(1[0-2]|0[1-9])-(0[1-9]|1\\d|2[0-8])" print ymd -- "2048-12-08" etc.Masahiro Honma (hiratara@cpan.org)