On 3/4/06 8:00 PM, "Jim Witte" <[EMAIL PROTECTED]> wrote: > How can I use a RegEx to strip trailing white-space? I tried: > > get matchText(theExpr, "(.*)\s*", theExpr) > > where theExpr is "0025E95C mov r5, r0 " > _______________________________________________
put "(.*[^\s])" into regEx --trims spaces from right get matchText(strr,regEx,strr) Basically says capture the whole string and come back until the character is not a "word delimiter", not necessarily a space. If you only want spaces to qualify then use put "(.*[^\ ])" into regEx --trims spaces from right (note the space char after the "\") put "([^\s]+)" into RegEx --matches only the first word Basically says capture the characters as long as it is not a "word delimiter". Ken has MUCH better experience and even gives time trial results :-) Jim Ault Las Vegas _______________________________________________ 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