[OS X TeX] TeXShop Find/Replace using regexp

Herbert Schulz herbs at wideopenwest.com
Sat Apr 8 09:09:38 EDT 2006

On Apr 8, 2006, at 7:41 AM, Bernhard Barkow wrote:

> Hi,
> Searching using regular expressions works fine, I just can't figure  
> out how to use pattern matches in the Replace field; does anyone  
> know if and how this is possible? (like using $0 in perl or php.) I  
> wasn't able to find any documentation on that topic.
> TIA,
> Bernhard


I think by default OgreKit uses Ruby regex but don't know much about  
that. If Find has (a)(b), Replace has \2\1 I can convert ab->ba;  
i.e., the parentheses define the groups in Find and have default  
integer names for the groups from left to right while the reference  
to the group is \groupnumber. Umm... I'd test that out before going  

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list