[OS X TeX] Regular expressions

André Bellaïche abellaic at math.jussieu.fr
Sat May 12 06:37:11 EDT 2007


Le 12 mai 07 à 11:46, Peter Dyballa a écrit :

>
> 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´´.

Thanks. I thought regular expressions were the same kind of  
expressions you use in Unix when you type 'rm a*' or 'rm *'

>
>
> 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 MacOSX-TeX mailing list