I don't claim to be a regular expression expert (just a long time list lurker), but I recently had the same need for a trim command and came up with this function:

function trimWS pText
  -- Remove all leading and trailing whitespace characters.
  -- I.E., space, tab, carriage return, line feed, form feed.

  return replaceText(pText,"(^\s+)|(\s+$)",empty)

end trimWS


Gary

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

Reply via email to