Changes for version 0.06 - 2026-11-30

  • Enhancements
    • Added support for lazy quantifiers, such as a+?
    • Added support for the /x and /xx modifiers and (?x)
    • Backreferences may now be quantified
    • Added support for \S, \b, \B, \x and POSIX classes
    • Added support for \A, \z, \Z, atomic groups and inline flags such as (?i)
    • Added support for \k{name}, \g{name}, \g1, \g{1}, \g{-1} and \k'name'
  • Bug Fixes
    • Fixed random-string --unique, which had no effect
    • Fixed a test failure when PERLDOC asks for bold output Fixes RT#174512
    • Each repetition of a group is now generated separately: (a|b){3} could only give aaa or bbb
    • Fixed {,n}, which always gave no repetitions, and quantifiers with blanks such as { 1 , 3 }
    • Braces after other text which are not a quantifier, such as a{x}, are now literal characters
    • suggest_simpler_pattern() no longer suggests removing lookarounds, which changed the strings
    • suggest_simpler_pattern() notices all backreferences
    • generate_many() now gives reproducible unique batches when a seed is set
    • pattern_info() no longer reports features which are not there
    • pattern_info() lengths are now much more accurate
    • Fixed backreferences to groups which were left out, e.g. (a)?\1
    • Fixed character classes and groups containing \\], brackets or a leading ]
    • Fixed \D and \W within a class, ranges with escaped ends such as [\x41-\x43] and [^\S]
    • Fixed ^ following an inline flag, e.g. (?i)^abc
    • validate() no longer accepts an unwanted trailing newline
    • generate_many() now rejects counts which are not whole numbers
  • Packaging
    • The cookbook script is now in examples/ and is no longer installed
    • Removed unused prerequisites
    • IPC::System::Simple is now required to run, since Params::Get 0.17 cannot load without it
  • Documentation
    • random-string now reports the version of the module, and documents the new syntax
    • Added an API SPECIFICATION for each method
    • Documented the messages, results and generation behaviour of each method

Documentation

Generate random strings matching a regular expression

Modules

Generate random strings matching a regex