Wildcard? replaceText, offset?

dunbarx at aol.com dunbarx at aol.com
Sun Apr 26 15:15:14 EDT 2020

Pay no attention to the previous post, which only dealt with a single integer. Sloppy.
THIS old fashioned method works, though:
on mouseUpput offset("(",yourString) into startCharput offset(")", yourString) into endCharput random(999) into char (startChar + 1) to (endChar -1) of yourStringend mouseUp


-----Original Message-----
From: doc hawk via use-livecode <use-livecode at lists.runrev.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Cc: doc hawk <dochawk at gmail.com>
Sent: Sun, Apr 26, 2020 2:41 pm
Subject: Re: Wildcard? replaceText, offset?

On Apr 26, 2020, at 11:24 AM, Rick reasoned

> In the middle-end part of the string I have “(x)” where x represents some integer.
> it could be (4) or (10) or (5) etc.

If you’re certain that this is the only, or even the first, integer, a regular expression search and replace or [0-9]+  would  do the trick.
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list