Regular expressions

J. Landman Gay jacque at hyperactivesw.com
Tue Jul 2 13:26:28 EDT 2013


On 7/2/13 12:13 PM, Terry Vogelaar wrote:
> Hi Jan,
>
> This sure is helpful.
>
> However, I need to do some thinking how I can turn this into a
> search-and-replace-all style action. I probably need to write a loop
> where I use offset to find the first "<span", then find the first
> "</span>", then use matchChunk to see if it matches and to put things
> in variables, and then change the span tags into something else
> temporarily to keep the offset function to find the first one over
> and over again, and if the last one is found, do some cleaning up to
> get the span tags back into place.

You wouldn't need to change the text if you use the third parameter in 
the offset command (in the dictionary, "charsToSkip".) That allows you 
to pick up the offset search where you left off.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list