Scroll to navigation

TXT2REGEX(1) General Commands Manual TXT2REGEX(1)

NAME

txt2regex -- console regular expression wizard

SYNOPSIS

txt2regex [--nocolor|--whitebg] [--all|--prog programs]

txt2regex --showmeta

txt2regex --showinfo program [--nocolor]

txt2regex --history value [--all|--prog programs]

txt2regex --make label [--all|--prog programs]

DESCRIPTION

txt2regex is a regular expression wizard that converts human sentences to regexes.

In a simple interactive console interface, the user answer questions and txt2regex builds the regexes for more than 20 programs.

https://aurelio.net/projects/txt2regex/

OPTIONS

Select all the available programs. Be aware that the list of available programs is long. You will need a terminal window with more than 40 lines for the user interface to fit. Also make sure that the $LINES shell variable is exported, so txt2regex can detect the current number of available lines.

Print the help message and quit.

Print a regex from the given history data. The history value is shown in the last screen of the wizard, when you quit.

Print a ready regex for the specified label. Inform an empty label to see the list of available labels.

Do not use colors.

Specify which programs to use, separated by commas. Use --showmeta to see the complete list of available programs.

Print regex-related info about the specified program. Use --nocolor to have a text-only output (no control characters).

Print a metacharacters table featuring all the programs.

Print the program version and quit.

Adjust colors for white background terminals.

EXAMPLES

txt2regex

txt2regex --prog perl,python,php,javascript

txt2regex --showmeta

txt2regex --showinfo sed

txt2regex --history '16421¤:01¤:'

txt2regex --make hour
txt2regex --make number3 --prog perl
txt2regex --make date2 --all

WIZARD INTERFACE

+---------------------------------------+
| Top menu                              |
| Group menu                            |
|                                       |
| Regexes of the selected programs      |
| ...                                   |
| ...                                   |
|                                       |
| History                               |
| Prompt                                |
|                                       |
| The question                          |
| The answers                           |
| ...                                   |
| ...                                   |
+---------------------------------------+

WIZARD COMMANDS

. Quit the program (with confirmation)
0 Reset the regular expression
1-9 Answers the questions
* Toggles color ON/OFF
/ Add/remove programs
| Insert an alternation (where allowed)
( Open a new group (where allowed)
) Close the opened group (if any)

BUGS

https://github.com/aureliojargas/txt2regex/issues

AUTHOR

Aurelio Jargas <verde@aurelio.net>

COPYRIGHT

Copyright © 2001-2020 Aurelio Jargas, GNU GPL v2

May 21, 2020