There are some interactive regex tools around. I use a python one sometimes. You just then have to be careful re escaping and the style of regular expressions used in the tool you worked with and the target environment.
Christian Hoffmann wrote: > Hi, > > I am trying to use sub, regexpr on expressions like > > log(D) ~ log(N)+I(log(N)^2)+log(t) > > being a model specification. > > The aim is to produce: > > "ln D ~ ln N + ln^2 N + ln t" > > The variable names N, t may change, the number of terms too. > > I succeded only partially, help on regular expressions is hard to > understand for me, examples on my case are rare. The help page on R-help > for grep etc. and "regular expressions" ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html