I want to cut a part out of a text.
For example: I need the part between "," and " and" from "This is a test, a second test and a third test."
In php there is something like "substr" and "strstr".
But is there a function in Revolution that does what I want?
I have been search the red in my eyes... But I didn't find it.
Can anyone help me?
cut a part out of a text...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: cut a part out of a text...
Easy, you just need to cut up text the way you like. Is the example you posted typical of what you always will be dealing with? The following script assumes this:
This can be extended and generalized once you get the idea.
Code: Select all
on mouseup
put item 2 of yourData into yourString
answer char 1 to offset("and",yourString) + 3 of yourString --did you want the "and"?
answer char 1 to offset("and", yourString) - 1 of yourString -- or not
end mouseup
Re: cut a part out of a text...
phoe... it is so easy that I didn't found it...
Thanx


Thanx