SagePourpre Posted July 30, 2008 Share Posted July 30, 2008 Hi ! I would like to take off this expression all variablesCODE$expression = 'MouseClick("left",$x,$Y,$click)I have thought of something like this. CODE$expression = stringsplit($expression,"$")it gives an array like that1 = MouseClick("left",2 = x,3 = Y,4 = $click)I want now that each string following array[2] to array[0] to be analysed and if symbols "+" "-" "=" ")" or " " to cutthis string down again. Finally it would give me something like this2 = x3 = y4 = clickThe names of my variablesTo recapitulate, here's the code I already madeCODE$expression = 'MouseClick("left",$x,$Y,$click)$expression = stringsplit($expression,"$") Now I want to "read the string" stop at those symbols "+" "-" "=" ")" or " " and to return the result of what is between my stringsplit "$" and symbols,also known as ... variables names found in $expression Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 31, 2008 Share Posted July 31, 2008 (edited) If you just want variables, you should run a regular expression for pseudo expression "starts with $, contains letters numbers underscore, ends with non letter number underscore". I don't know enough about regular expressions but I know this is doable. Edited July 31, 2008 by Richard Robertson Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now