This ASCII-art table is literally what I need to parse:
\---------\-------------\-------------\
| Username| IP | Connected |
\---------\-------------\-------------\
| test | 127.0.0.1 | Yes |
| atest | 192.168.2.1 | No |
| aaa | 1.2.3.4 | Yes |
\---------\-------------\-------------\
And I have to convert it into HTML like this
<thead>
<tr>
<td>Username</td>
<td>IP</td>
<td>Connected</td>
</tr>
</thead>
<tr>
<td>Test</td>
<td>127.0.0.1</td>
<td>Yes</td>
</tr>
<tr>
<td>Atest</td>
<td>192.168.2.1</td>
<td>No</td>
</tr>
<tr>
<td>aaa</td>
<td>1.2.3.4</td>
<td>Yes</td>
</tr>
</table>
Of course the content is only an example. The rows can be 40 like only 3.
Problem Solved