[OS X TeX] Smart search

Martin Wilhelm Leidig listwatch at moss.in-berlin.de
Sat Dec 19 02:33:33 CET 2015


Am 2015-12-19 um 02:15 schrieb Claus Gerhardt:

> In BBEdit I used the search string
> 
> alpha(.+)\((.+)\)

Depending on the the type of RE engine used the unspecific second group can lead to time-consuming backtracks.  Better use something like that:

alpha(.+)\(([^)]+)\)

(or maybe 

alpha(.+)\(([^\)]+)\)

if the „)“ needs to be quoted inside a character range, again depending on the RE engine).

> to be replaced by
> 
> alpha\1 \2

That would be the same in AlphaX while with Textmate (which uses Oniguruma rsp. Onigmo) the second pattern would be

alpha$1 $2

Afaik the TeXShop editor also uses the Oniguruma RE engine so the latter one should be true there to.


-Moss-
-- 
Debugging?  Klingons do not debug.  Our software does not coddle the weak.
				-- not by Peter Dyballa (as he vows)






More information about the macostex-archives mailing list