Replacing multiple elements with regexp

Feb 20, 2008 at 2:52pm

Replacing multiple elements with regexp


I have a textedit object where the user can enter simple functions using x,y,z. Now I want to replace every x by in[0].p[0], every y by in[0].p[1] and every z by in[0].p[2].

So far I’ve only managed to replace 1 letter using: regexp x in[0].p[0]

Can someone help me with how to enter all three substitutions in the regexp object…I’ve been trying several tactics but I’m afraid my regexp knowledge is virtually non-existent.


Feb 20, 2008 at 3:15pm

Feb 20, 2008 at 5:23pm

Ah. yes. Sometimes the easiest solutions are overlooked first. Thanks.


You must be logged in to reply to this topic.