Current version: 1.0.1

Command line options


-d NNN
--debug-code=NNN
  Set the debugging code to NNN. NNN is an integer, currently between 0 and 31 (inclusive). This would probably be better named "verbose-code", as it allows you to turn on and off the verboseness of different program sections.

1 = Errors
2 = Program Arguments
4 = Character Set Actions
8 = General Regex Parsing
16 = Detailed Regex Parsing

You can decide which sections you want to be verbose by adding only those numbers, and giving the sum to --debug-code. The default value is 1.

-f filename
--file=filename
  Read in the regular expression from the file filename. The regular expression should be given on one line in the file, with or without an ending carriage return (ASCII 10). If the special filename - is given, regldg will finish parsing the command line arguments and then wait for you to enter the regular expression. This wait will occur without a prompt, so that expected output isn't altered.
-m NNN
--max-length=NNN
  Set the maximum length of the "words" output to NNN. NNN is an integer, currently 0 or more. If your regular expression has open-ended quantifiers like *, +, or {3,}, you'll want to keep the maximum length of the words output in check. Otherwise, there'll be no problems setting it very high.
-n NNN
--num-words-output=NNN
  Limit the number of words output to NNN. NNN is an integer. Negative values mean no limit. The default is -1.
-p
--parse-only
  Tells regldg to parse the regular expression verbosely, then quit.
-r
--readable-output
  Replace any "non-printable" character (as defined by isprint() in the ctype.h library, man isprint) with it's ASCII decimal equivalent surrounded by { and }. This will allow you to use non-printable characters in your regular expressions, and see what will happen in the output. You can avoid things like printing system bells, unintended newline characters, backspaces, and any other non-printable character.
-uc NNN
--universe-checking=NNN
  Set the character universe checking code to NNN. NNN is an integer, currently between 0 and 3 (inclusive). Following are descriptions of the character universe checking options:

1 = Prevent characters which are not in the character universe to be included when explicitly stated. Without this, you are allowed to use "foreign" characters in your regular expression without modifying the character universe.
2 = Prevent character and meta-character classes from being intersected with the current character universe. Without this, . would represent ASCII characters 0-255, instead of only those in the current character universe.

You can combine the character universe checking codes by adding their numbers, and giving the sum to --universe-checking. The default value is 3 (strict character universe checking).

-us NNN
--universe-set=NNN
  Set the character universe to pre-defined set NNN. NNN is an integer, currently between 0 and 255 (inclusive). Following are descriptions of the pre-defined universe sets:

1 = Uppercase letters A-Z
2 = Lowercase letters a-z
4 = Digits 0-9
8 = Shift-digits !@#$%^&*
16 = Punctuation ",'.:;?_` and [space]
32 = Parens, brackets and braces ()[]{}
64 = Other stuff ~/|\
128 = Math +-=

You can combine the universe sets by adding their numbers, and giving the sum to --universe-set. The default value is 7. This will override any previous -u or -us arguments.

-u [UNIVERSE]
--universe=[UNIVERSE]
  Explicitly specify the character universe as a character class. This will override any previous -u or -us arguments. Note: this does not take into account any previously defined universe or universe set. Any meta-characters specified here will be fully included - . will include all ASCII characters 0-255. Negated character classes (those with ^ as the first character) will be calculated from the full set of ASCII characters 0-255.