Hi Benjohn, Am Mittwoch, 13. Dez 2006, 18:24:08 +0900 schrieb benjohn / fysh.org: > Eg, to scan for variables called x or y, I might use: > /(^|[^a-zA-Z])[xy]([^a-zA-Z]|$)/ > > but using that on "exp(x)" will match (and replace) "(x)", which I don't > want at all. /\b[xy]\b/ The \b pattern (word boundary) will look to the left like the ^ pattern does. I would appreciate if there were a general pattern looking to the left corresponding to (?=re) what is non-consuming to the right. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de