[OS X TeX] ifthen and regular expressions

Jeffrey J Weimer weimerj at email.uah.edu
Tue May 15 17:11:28 CEST 2007


On May 15, 2007, at 7:13 AM, Friedrich Vosberg wrote:

> Does someone of You know how to get an ifthenelse switch that is  
> TRUE if the expansion of the given macro contains a given string.  
> For example:
>
> \def\string{court}
> \def\pattern{Royal High Court of Westminster}
>
> \ifthenelse{contains{\string}{\pattern}{%
>   TRUE
> }{%
>   FALSE
> }

The coolstr package may be able to handle this.

--
J. J. Weimer, Chemistry / Chemical & Materials Engineering
University of Alabama in Huntsville, MSB 125, 301 Sparkman Dr
Huntsville, AL 35899                phone: 256-824-6954



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