Pinery: Generation from Perl regular expression

Input Perl regular expression:

Maximal generation time (seconds) :

Maximal count of tests to generate:

Maximal size of '*'-lists and '+'-lists:

Iterate symbols' values in linear order
Iterate symbols' values in random order
Get symbols' values in random order

Combine elements as Cartesian product (only in 'iterate' mode)
Combine elements as 'diagonal' (tuples: all n-th elements)

Display result on web-page
Get result as zip-archive


Pinery is intended for generation of structurally complex test data on the basis of grammar-like descriptions (such as BNF, regular expressions, DTD, etc.). This service allows generating tests from Perl regular expressions.

The following constructs of Perl regular expressions are supported in Pinery:
. Any character
| Alternation
[...] Character class
[^...] Inverted character class
\t Tab
\w A "word" character: [a-zA-Z_] (without digits!)
\W A non-word character: [^a-zA-Z0-9_] (also without digits!)
\s A whitespace character: [ \t]
\S All but \s
\d A digit character: [0-9]
\D A non-digit character
? Optional element (i.e. 1 or 0 times)
* List of length >= 0 (i.e. 0 or more times)
+ List of length >= 1 (i.e. 1 or more times)
{size} List of length = size (i.e. exactly size times)
{min,} List of length >= min (i.e. at least min times)
{min,max} List of length >= min and <= max (i.e. at least min but not more than max times)
\ Quote the next metacharacter (such as '[', '(', '\' etc.)

Markers for the beginning of the line and for the end of the line (^ and $) are ignored.

Note that the Pinery generator treats all quantifiers (but {size}) as minimal (i.e. "non-greedy"). Thus, for the regular expression 'a*.' the line 'aaa' may be generated. In order to obtain correct line in this example, the regular expression should be modified as follows: 'a*[^a]'.

Copyright © 2006 Institute for System Programming of the Russian Academy of Sciences