Stuck On Regex (Again)

Mike Bonner bonnmike at
Mon Feb 23 12:01:30 EST 2015

try \s+

\s replaces space with space.
\s+ does a greedy replace where it tries to replace as many of the same
token as it can at one time, so it'll grab all the consecutive whitespace
and replace it with space.

On Mon, Feb 23, 2015 at 9:48 AM, Bob Sneidar <bobsneidar at>

> Hi all.
> In a regex expression, “\s" is supposed to work for white space. Hows come
> then, given that myVar contains "Availability  BatteryRechargeTime
> BatteryStatus  Caption           Chemistry”:
> put replaceText(myVar, "\s", space) into myVar
> leaves myVar unchanged?
> Bob S
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list