Strip %0A%09%09

hello,
I need to strip ‘%0A%09%09’ from the end of a string…what should I use to do it? I tried searching for ‘%0A%09%09’ in ‘righthalf%0A%09%09’ but it returned as undefined…do i use it like this? :ear:

a= a.search("%0A%09%09");

Thanks

a=“righthalf%0A%09%09”
//use to convert it into plain text:
b=unescape(a)
//use to find out the position where a string appears first in another string:
b=a.indexOf("%0A%09%09")
//use to give return the string except %0A%09%09 stuff:
b=a.substring(0,indexOf("%0A%09%09"))

Thanks for the quick reply.

when i try this:

the string i get is the same one i put in (‘righthalf%0A%09%09’)

oups, sorry
of course it’s
b=a.substring(0,**a.**indexOf("%0A%09%09"))

ahh! perfect… i should have that of that doh! lol

Thanks a lot, it works now!