Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 41:21:25 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 174,725 |
I have a boat load of HTML files from which I must excise a certain
text pattern.
Here is the pattern consisting of four lines:
<span class="prompt">
(%ixxx)
</span></td>
Each line can be followed by any number of spaces, tabs, or line
feeds (LF) characters.
The (%ixxx) can contain 1, 2, or 3 numeric characters, i.e.
(%i222), (%i22), or (%i2).
Each file can contain one or more occurrences of this pattern.
What regular expression can I use to eliminate all of these
unwanted lines?
I am using "Find and Replace" (FAR)
which allows regular expression
entry:
<findandreplace.sf.net>
Can anyone answer?
Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!
Distro lackeys couldn't find the button on their GNOME DE's.
Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!
Note: the fantastic FAR software likely will not run on that
infernal piece of shit known as Wayland.
What regular expression can I use to eliminate all of these
unwanted lines?
Can anyone answer?
On Sat, 04 Oct 2025 18:23:06 +0000, Farley Flud wrote:
What regular expression can I use to eliminate all of these
unwanted lines?
Can anyone answer?
As I predicted, no one can answer.
There are no GNU/Linux users here but only ignoramus dabblers
and installers, i.e. distro lackeys that, like beggars, take
whatever is thrown at them.
But anyway, here is the correct regex:
<td>[\r\t\s]*<span class="prompt">[\r\t\s]*\(%i[0-9]*\)[\r\t\s]*</span>[\r\t\s]*</td>
The FAR program is a great tool. It first allows a kind of--
preview by finding all files that match the regex. If no files
are found then the regex is FUBAR and another one must be
created.
FAR also has the option of backing up all files just in case
an ill-composed regex ends up mangling everything.