[CLUE-Talk] Multiline Regex
Timothy Klein
teece at silverklein.net
Fri Jul 2 11:24:24 MDT 2004
Hey,
I am LaTeX-ifying a large text file (430 pages in the PDF/DVI). It has a
glossary that makes up the bulk of these pages.
It is using the convention of _example_ to signal the meaning of old English
words in each entry. So I want to find all these underscore pairs and change
them to \textit{example}. It would be super easy if all of them were only a
line or less. But a lot of them span multiple lines, like _a longer
multiline example_.
I kludged VIM in to giving me a multiline regex to sourround the glossary
headwords into paragraph sectioning, but I am having no luck with this one.
Anyone have any ideas?
I found a sed script on the web to do something similar to this, but I know
nothing about sed, so can't implement it without a lot of new learning. Perl
can probably do it, but then I'd have to remember Perl. Is there a way to
make VIM do mulitilne regex? I haven't found much on Google.
Tim
--
== Timothy Klein || teece at silverklein.net
== Vanity Page: http://tinyurl.com/vkhp
== ----------------------------------------
== Hello_World.c: 17 Errors, 31 Warnings...
More information about the clue-talk
mailing list