Skip to content

Number of examples improved

Choose a tag to compare

@tom-lord tom-lord released this 24 Jan 17:17
· 333 commits to master since this release

The main (noticable) change is that the number of examples generated for repeaters is better defined:

.* is equivalent to .{0,2}
.+ is equivalent to .{1,3}
.{2,} is equivalent to .{2,4}
.{,3} is equivalent to .{0,2}
.{3,8} is equivalent to .{3,5}

There are also various bug fixes, such as:

  • Empty character sets, e.g. /[^\w\W]/.examples (Previously returned ["-"]; now [])
  • Mixing OrGroups and backreferences, e.g. /(a|b)\1/.examples (Previously didn't work properly, at all)