1TXT2REGEX(1) General Commands Manual TXT2REGEX(1)
2
3
4
6 txt2regex -- console regular expression wizard
7
9 txt2regex [--nocolor|--whitebg] [--all|--prog programs]
10
11 txt2regex --showmeta
12
13 txt2regex --showinfo program [--nocolor]
14
15 txt2regex --history value [--all|--prog programs]
16
17 txt2regex --make label [--all|--prog programs]
18
20 txt2regex is a regular expression wizard that converts human sentences
21 to regexes.
22
23 In a simple interactive console interface, the user answer questions
24 and txt2regex builds the regexes for more than 20 programs.
25
26 https://aurelio.net/projects/txt2regex/
27
29 --all Select all the available programs. Be aware that the list of
30 available programs is long. You will need a terminal window with
31 more than 40 lines for the user interface to fit. Also make sure
32 that the $LINES shell variable is exported, so txt2regex can
33 detect the current number of available lines.
34
35
36 -h, --help
37 Print the help message and quit.
38
39
40 --history <value>
41 Print a regex from the given history data. The history value is
42 shown in the last screen of the wizard, when you quit.
43
44
45 --make <label>
46 Print a ready regex for the specified label. Inform an empty
47 label to see the list of available labels.
48
49
50 --nocolor
51 Do not use colors.
52
53
54 --prog <program1,program2,...>
55 Specify which programs to use, separated by commas. Use
56 --showmeta to see the complete list of available programs.
57
58
59 --showinfo <program>
60 Print regex-related info about the specified program. Use
61 --nocolor to have a text-only output (no control characters).
62
63
64 --showmeta
65 Print a metacharacters table featuring all the programs.
66
67
68 -V, --version
69 Print the program version and quit.
70
71
72 --whitebg
73 Adjust colors for white background terminals.
74
75
77 Using it as a wizard (interactive interface):
78
79
80 txt2regex
81
82
83
84
85 Specify a custom selection of programs for the wizard:
86
87
88 txt2regex --prog perl,python,php,javascript
89
90
91
92
93 Getting an extensive metacharacters table:
94
95
96 txt2regex --showmeta
97
98
99
100
101 Getting regex-related information about sed:
102
103
104 txt2regex --showinfo sed
105
106
107
108
109 Replay a regex by using history data:
110
111
112 txt2regex --history '16421¤:01¤:'
113
114
115
116
117 Getting handy ready-to-use regexes for common patterns:
118
119
120 txt2regex --make hour
121 txt2regex --make number3 --prog perl
122 txt2regex --make date2 --all
123
124
125
126
128 +---------------------------------------+
129 | Top menu |
130 | Group menu |
131 | |
132 | Regexes of the selected programs |
133 | ... |
134 | ... |
135 | |
136 | History |
137 | Prompt |
138 | |
139 | The question |
140 | The answers |
141 | ... |
142 | ... |
143 +---------------------------------------+
144
145
146
148 . Quit the program (with confirmation)
149 0 Reset the regular expression
150 1-9 Answers the questions
151 * Toggles color ON/OFF
152 / Add/remove programs
153 | Insert an alternation (where allowed)
154 ( Open a new group (where allowed)
155 ) Close the opened group (if any)
156
157
159 https://github.com/aureliojargas/txt2regex/issues
160
162 Aurelio Jargas <verde@aurelio.net>
163
165 Copyright © 2001-2020 Aurelio Jargas, GNU GPL v2
166
167
168
169
170 May 21, 2020 TXT2REGEX(1)