Liste des Groupes | Revenir à c editors |
On Sat, 13 Jul 2024 11:08:48 -0500, Richard Owlett wrote:I'll use parsing that expression as a guide to understanding>Yes, of course. Any editor above the level of Notepad ought to be
I'm reformatting some HTML files containing chapters of the KJV Bible.
My source follows the practice of italicizing some words.
I find italics distracting.
>
These occurrences are consistently of the form
<span class='add'>arbitrary_text</span>
>
I wish to delete "<span class='add'>" and *ASSOCIATED* "</span>".
Obviously it would not be wise to fully automate the action.
I wish to find all occurrences of <span
class='add'>arbitrary_text</span> an manually confirm the edit.
>
In general, is it feasible?
able to do this. (Sadly, a lot of editors are not above the level of
Notepad.)
For instance, in Vim you would use this command after opening the
file:
:%s;<span class='add'>\([^<]*\)</span>;\1;gc
% = process every line of the file
\( ... \) makes that part of the pattern match addressable
[^>]* matches a string of characters not including a <. If there is
other HTML between span and /span, it will not match.
\1 = the text found between span and /span
gc = do every occurrence on each line, but confirm each one
I'm gaining an appreciation of just how much HTML Kate can handle.Can KDE's Kate do it?I've no idea.
But there's an easier solution. Change the definition of class add inLearning CSS is beyond my current goals.
your style sheet:
span.add { font-style:normal; }
Then you won't have to edit the HTML at all.
>
Les messages affichés proviennent d'usenet.