1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
<!DOCTYPE html>
<html>
<head>
<title>TXT2REGEX</title>
<meta name="generator" content="http://txt2tags.org">
<style>
body{background-color:#fff;color:#000;}
hr{background-color:#000;border:0;color:#000;}
hr.heavy{height:5px;}
hr.light{height:1px;}
img{border:0;display:block;}
img.right{margin:0 0 0 auto;}
img.center{border:0;margin:0 auto;}
table th,table td{padding:4px;}
.center,header{text-align:center;}
table.center {margin-left:auto; margin-right:auto;}
.right{text-align:right;}
.left{text-align:left;}
.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
.underline{text-decoration:underline;}
</style>
</head>
<body>
<header>
<hgroup>
<h1>TXT2REGEX</h1>
<h3>May 21, 2020</h3>
</hgroup>
</header>
<article>
<div class="body" id="body">
<section>
<h1>NAME</h1>
<p>
<strong>txt2regex</strong> -- console regular expression wizard
</p>
</section>
<section>
<h1>SYNOPSIS</h1>
<p>
<strong>txt2regex</strong> [<strong>--nocolor</strong>|<strong>--whitebg</strong>] [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>
<p>
<strong>txt2regex</strong> <strong>--showmeta</strong>
</p>
<p>
<strong>txt2regex</strong> <strong>--showinfo</strong> <em>program</em> [<strong>--nocolor</strong>]
</p>
<p>
<strong>txt2regex</strong> <strong>--history</strong> <em>value</em> [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>
<p>
<strong>txt2regex</strong> <strong>--make</strong> <em>label</em> [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>
</section>
<section>
<h1>DESCRIPTION</h1>
<p>
<strong>txt2regex</strong> is a regular expression wizard that converts human
sentences to regexes.
</p>
<p>
In a simple interactive console interface, the user answer questions and
<strong>txt2regex</strong> builds the regexes for more than 20 programs.
</p>
<p>
<em>https://aurelio.net/projects/txt2regex/</em>
</p>
</section>
<section>
<h1>OPTIONS</h1>
<dl>
<dt><strong>--all</strong></dt><dd>
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 <strong>$LINES</strong>
shell variable is exported, so <strong>txt2regex</strong> can detect the current
number of available lines.
<p></p>
</dd>
<dt><strong>-h</strong>, <strong>--help</strong></dt><dd>
Print the help message and quit.
<p></p>
</dd>
<dt><strong>--history <value></strong></dt><dd>
Print a regex from the given history data. The history value is shown in
the last screen of the wizard, when you quit.
<p></p>
</dd>
<dt><strong>--make <label></strong></dt><dd>
Print a ready regex for the specified label. Inform an empty label to
see the list of available labels.
<p></p>
</dd>
<dt><strong>--nocolor</strong></dt><dd>
Do not use colors.
<p></p>
</dd>
<dt><strong>--prog <program1,program2,...></strong></dt><dd>
Specify which programs to use, separated by commas. Use <strong>--showmeta</strong>
to see the complete list of available programs.
<p></p>
</dd>
<dt><strong>--showinfo <program></strong></dt><dd>
Print regex-related info about the specified program. Use <strong>--nocolor</strong>
to have a text-only output (no control characters).
<p></p>
</dd>
<dt><strong>--showmeta</strong></dt><dd>
Print a metacharacters table featuring all the programs.
<p></p>
</dd>
<dt><strong>-V</strong>, <strong>--version</strong></dt><dd>
Print the program version and quit.
<p></p>
</dd>
<dt><strong>--whitebg</strong></dt><dd>
Adjust colors for white background terminals.
</dd>
</dl>
</section>
<section>
<h1>EXAMPLES</h1>
<dl>
<dt>Using it as a wizard (interactive interface):</dt><dd>
<p></p>
<pre>
txt2regex
</pre>
<p></p>
</dd>
<dt>Specify a custom selection of programs for the wizard:</dt><dd>
<p></p>
<pre>
txt2regex --prog perl,python,php,javascript
</pre>
<p></p>
</dd>
<dt>Getting an extensive metacharacters table:</dt><dd>
<p></p>
<pre>
txt2regex --showmeta
</pre>
<p></p>
</dd>
<dt>Getting regex-related information about sed:</dt><dd>
<p></p>
<pre>
txt2regex --showinfo sed
</pre>
<p></p>
</dd>
<dt>Replay a regex by using history data:</dt><dd>
<p></p>
<pre>
txt2regex --history '16421¤:01¤:'
</pre>
<p></p>
</dd>
<dt>Getting handy ready-to-use regexes for common patterns:</dt><dd>
<p></p>
<pre>
txt2regex --make hour
txt2regex --make number3 --prog perl
txt2regex --make date2 --all
</pre>
</dd>
</dl>
</section>
<section>
<h1>WIZARD INTERFACE</h1>
<pre>
+---------------------------------------+
| Top menu |
| Group menu |
| |
| Regexes of the selected programs |
| ... |
| ... |
| |
| History |
| Prompt |
| |
| The question |
| The answers |
| ... |
| ... |
+---------------------------------------+
</pre>
</section>
<section>
<h1>WIZARD COMMANDS</h1>
<table>
<tr>
<td class="center"><strong>.</strong></td>
<td>Quit the program (with confirmation)</td>
</tr>
<tr>
<td class="center"><strong>0</strong></td>
<td>Reset the regular expression</td>
</tr>
<tr>
<td class="center"><strong>1-9</strong></td>
<td>Answers the questions</td>
</tr>
<tr>
<td class="center"><strong>*</strong></td>
<td>Toggles color ON/OFF</td>
</tr>
<tr>
<td class="center"><strong>/</strong></td>
<td>Add/remove programs</td>
</tr>
<tr>
<td class="center"><strong>|</strong></td>
<td>Insert an alternation (where allowed)</td>
</tr>
<tr>
<td class="center"><strong>(</strong></td>
<td>Open a new group (where allowed)</td>
</tr>
<tr>
<td class="center"><strong>)</strong></td>
<td>Close the opened group (if any)</td>
</tr>
</table>
</section>
<section>
<h1>BUGS</h1>
<p>
<a href="https://github.com/aureliojargas/txt2regex/issues">https://github.com/aureliojargas/txt2regex/issues</a>
</p>
</section>
<section>
<h1>AUTHOR</h1>
<p>
Aurelio Jargas <<verde (a) aurelio net>>
</p>
</section>
<section>
<h1>COPYRIGHT</h1>
<p>
Copyright © 2001-2020 Aurelio Jargas, GNU GPL v2
</p>
</section>
</div>
<!-- html code generated by txt2tags 3.4 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html man/txt2regex.t2t -->
</article></body></html>
|