Stuck On Regex (Again)
Mike Bonner
bonnmike at gmail.com
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 iotecdigital.com>
wrote:
> 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 lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list