[OS X TeX] Regular expressions

George Gratzer gratzer at ms.umanitoba.ca
Mon May 14 03:26:15 CEST 2007


Pete,

How do you do the two lines under your name?

GG

On May 12, 2007, at 4:46 AM, Peter Dyballa wrote:

>
> Am 12.05.2007 um 10:58 schrieb André Bellaïche:
>
>> P.S. The regular expression search does not seem to work very  
>> well : when you search for 'cla*', you get not only  
>> 'documentclass...', but also 'cleardoublepage' or 'clos',  
>> 'cloche'. The 'a' is not seen.
>
> That's a correct behaviour: the ``*´´ in a regular expression  
> stands for 0 to ∞ repetitions of the last character. So indeed you  
> are searching for everything that contains at least ``cl´´.
>
>
> If some characters play no role, then don't mention them – or do  
> you like to talk a lot about something that does not matter  
> anything to anyone? This expression might be more useful:
>
> 	cla.*
>
> (I do not use the regexp form in TeXShop. It's not clear to me  
> whether there is some correspondence from my input to the output,  
> except when I am *not* using any wildcards. I prefer GNU Emacs,  
> which would find with either of these expressions all occurrences  
> of \index{*}:
>
> 	\\index{[^}]+}
> 	\\index{[^}]*?}
>
> backslash index { with an unknown number of characters of which is  
> *none* a } ending in })
>
> --
> Greetings
>
>   Pete
>
> »¿ʇı̣ əsnqɐ ʇ,uɐɔ noʎ ɟı̣
> ɓuı̣ɥʇʎuɐ sı̣ pooɓ ʇɐɥʍ«
>
>
>
> ------------------------- Helpful Info -------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
> List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
>
>
>


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list