On 4/13/05 7:22 PM, "Trevor DeVore" <[EMAIL PROTECTED]> wrote:
> On Apr 13, 2005, at 4:49 PM, Ken Ray wrote: >> get matchText(pWhat, "(?s)^\s+(.*?)\s+$", tReturnVal) >> >> I agree that the "word 1 to -1" solution will do what you want 95+% of >> the >> time, but just wanted to make sure that everyone knew there was at >> least one >> 'hole' in that approach in case anyone cared. ;-) > > Ah, good catch Ken. I think the only thing that needs changing is the > "+" sign after the \s. With this version if there is no white space at > the beginning or end of the string then no result is returned in > tReturnVal. So the modified (and hopefully all-encompassing) version > is: > > get matchText(pWhat, "(?s)^\s*(.*?)\s*$", tReturnVal) Equally good catch, Trevor... I'll update my library. :-) Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
