re::regmust may be of some help...
use 5.014; use strict; use warnings; use re (); use List::Util 'sum'; sub re_strictness ($) { sum map length, re::regmust shift } say re_strictness qr/Dad+y/; # says 5 say re_strictness qr/D.+/; # says 1
In reply to Re: how to measure strictness of a regex ?
by tobyink
in thread how to measure strictness of a regex ?
by didess
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |