* Regex to find long sentences in LaTeX
@ 2008-05-22 16:17 J.Burton
2008-05-23 2:42 ` Joel J. Adamson
2008-05-25 18:39 ` Andreas Röhler
0 siblings, 2 replies; 3+ messages in thread
From: J.Burton @ 2008-05-22 16:17 UTC (permalink / raw)
To: help-gnu-emacs
Hi, can someone show me a regex to find sentences in LaTeX docs with more than a
certain number of words? I want to find all sentences with > 30
words (I have a weakness for writing waffling sentences :-))
I started to get something going in re-builder but it needs to allow
LaTeX escape chars \{}[] (are there more?) within sentences as well as
normal punctuation.
Or maybe a regex isn't the best thing for this?
Thanks very much,
Jim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regex to find long sentences in LaTeX
2008-05-22 16:17 Regex to find long sentences in LaTeX J.Burton
@ 2008-05-23 2:42 ` Joel J. Adamson
2008-05-25 18:39 ` Andreas Röhler
1 sibling, 0 replies; 3+ messages in thread
From: Joel J. Adamson @ 2008-05-23 2:42 UTC (permalink / raw)
To: J.Burton; +Cc: help-gnu-emacs
J.Burton@brighton.ac.uk writes:
> Hi, can someone show me a regex to find sentences in LaTeX docs with more than a
> certain number of words? I want to find all sentences with > 30
> words (I have a weakness for writing waffling sentences :-))
> I started to get something going in re-builder but it needs to allow
> LaTeX escape chars \{}[] (are there more?) within sentences as well as
> normal punctuation.
Emacs has some standard regular expressions for sentences and
paragraphs. Check out the Elisp manual (info "(elisp) Standard
Regexps")
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regex to find long sentences in LaTeX
2008-05-22 16:17 Regex to find long sentences in LaTeX J.Burton
2008-05-23 2:42 ` Joel J. Adamson
@ 2008-05-25 18:39 ` Andreas Röhler
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Röhler @ 2008-05-25 18:39 UTC (permalink / raw)
To: help-gnu-emacs
Am Donnerstag, 22. Mai 2008 schrieb J.Burton@brighton.ac.uk:
> Hi, can someone show me a regex to find sentences in LaTeX docs with more
than a
> certain number of words? I want to find all sentences with > 30
> words (I have a weakness for writing waffling sentences :-))
> I started to get something going in re-builder but it needs to allow
> LaTeX escape chars \{}[] (are there more?) within sentences as well as
> normal punctuation.
>
> Or maybe a regex isn't the best thing for this?
Why not simple do an incremental search for Sentence-end (probably a dot
followed by one or two spaces)? Than all sentence-ends will be highlighted.
You may scroll the buffer and watch the distances.
Andreas Roehler
>
> Thanks very much,
>
> Jim
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-25 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 16:17 Regex to find long sentences in LaTeX J.Burton
2008-05-23 2:42 ` Joel J. Adamson
2008-05-25 18:39 ` Andreas Röhler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).