> > function Trim what > > local tText > > get matchText(what,"(?s)\s*(\S.*\S)\s*",tText) > > return tText > > end Trim > > Beware this function fails for > single-character-with-whitespace strings > like " s" and " 9 ". By changing the regex to > "(?s)\s*(\S.*\S?)\s*" and > checking the result of matchText(), we can make it safer. But > it still > was failing some of my tests- I can't remember which strings though.
Thanks for the heads-up, Alex. I'll see if there's a better way to do it and repost to the list when I have it... Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution