Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Microsoft has a SMT-based gratis (MSRL-licensed) "Rex" tool for this: <a href="http://research.microsoft.com/en-us/downloads/7f1d87be-f6d9-495d-a699-f12599cea030/" rel="nofollow">http://research.microsoft.com/en-us/downloads/7f1d87be-f6d9-495d-a699-f12599cea030/</a></p> <p>From the Introduction section of the "Rex: Symbolic Regular Expression Explorer" paper: </p> <blockquote> <p>We translate (extended) regular expressions or regexes [5] into a symbolic representation of finite automata called SFAs. In an SFA, moves are labeled by formulas representing sets of characters rather than individual characters. An SFA A is translated into a set of (recursive) axioms that describe the acceptance condition for the strings accepted by A and build on the representation of strings as lists.</p> </blockquote> <p>As the SMT solver can output all possible solutions within some size bound, this may be close to what you're looking for.</p> <p>On a more statistical and less formal front, the Regexp::Genex module from CPAN can work as well: <a href="http://search.cpan.org/dist/Regexp-Genex/" rel="nofollow">http://search.cpan.org/dist/Regexp-Genex/</a></p> <p>You can use it with something like this:</p> <pre><code>#!/usr/bin/env perl use Regexp::Genex ':all'; my $hits = 100; my $re = qr/[a-z](123|456)/; local $Regexp::Genex::DEFAULT_LEN = length $re; my %seen; while ((time - $^T) &lt; 2) { @seen{strings($re)} = (); $Regexp::Genex::DEFAULT_LEN++; } print "$_\n" for (sort %seen)[0..$hits-1]; </code></pre> <p>Adjust the time and sample size as needed. Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload