Well, I am relieved to say it wasn't such a dumb question after all. Thanks chaps! And thanks particularly to Thomas Fischer who has come up with the most elegant solution. QED. Now I need to go off and study regular expressions.....

Bob
------------------------------------------
>This is a classical application of regular expressions. Try

>get replaceText("        The cat sat on the mat.         ","^ *","")

>The "^" tells the search engine to start at the beginning.
>The "*" looks for as many of the previous characters (here space) as >possible.

>To get rid of them at the end use

>get replaceText("        The cat sat on the mat.         "," *$","")

>The "$" tells the search engine to look at the end.

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to