On 13 Apr 2005, at 18:09, Trevor DeVore wrote:
On Apr 13, 2005, at 3:14 AM, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy right now, I was hoping someone out there could work out what I'm doing wrong...
I want a single RegEx expression using ReplaceText to strip out leading and tailing spaces, leaving any spaces in the middle untouched.
Matt,
I use this regex to strip whitespace:
get replaceText(pString, "^[ \t\r\n]+|[ \t\r\n]+$", "")
-- Trevor DeVore Blue Mango Multimedia [EMAIL PROTECTED]
No offence, but this won't strip whitespaces at both ends of a string in one pass.
And it is about ten times slower for one pass than: get word 1 to -1 of pString
(which does strip leading and ending whitespaces in one pass, but true it is no regex).
Gr W.
_______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution