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]'.
|