Rexpy
The rexpy command
rexpy [FLAGS] [inputfile [outputfile]]
If inputfile is provided, it should contain one string per line;
otherwise lines will be read from standard input.
If outputfile is provided, regular expressions found will be written
to that (one per line); otherwise they will be printed.
Optional FLAGS may be used to modify Rexpy’s behaviour:
-h,--headerDiscard first line, as a header.
-?,--helpPrint this usage information and exit (without error)
-g,--groupGenerate capture groups for each variable fragment of each regular expression generated, i.e. surround variable components with parentheses, e.g.
^[A-Z]+\-[0-9]+$becomes
^([A-Z]+)\-([0-9]+)$-q,--quoteDisplay the resulting regular expressions as double-quoted, escaped strings, in a form broadly suitable for use in Unix shells, JSON, and string literals in many programming languages. e.g.
^[A-Z]+\-[0-9]+$becomes
"^[A-Z]+\\-[0-9]+$"--portableProduct maximally portable regular expressions (e.g.
[0-9]rather than\d). (This is the default.)--grepSame as
--portable--javaProduce Java-style regular expressions (e.g.
\p{Digit})--posixProduce POSIX-compilant regular expressions (e.g.
[[:digit:]]rather than\d).--perlProduce Perl-style regular expressions (e.g.
\d)-u,--underscore,-_Allow underscore to be treated as a letter. Mostly useful for matching identifiers.
-d,--dot,-.,--periodAllow dot to be treated as a letter. Mostly useful for matching identifiers.
-m,--minus,--hyphen,--dashAllow minus to be treated as a letter. Mostly useful for matching identifiers.
-v,--versionPrint the version number.
-V,--verboseSet verbosity level to 1
-VV,--VerboseSet verbosity level to 2
-vlf,--variableUse variable length fragments
-flf,--fixedUse fixed length fragments
Rexpy Examples
TDDA rexpy is supplied with a set of examples.
To copy the rexpy examples, run the command:
tdda examples rexpy [directory]
If directory is not supplied, rexpy_examples will be used.
Alternatively, you can copy all examples using the following command:
tdda examples
which will create a number of separate subdirectories.