regex/HTMLText question

Jim Ault jimaultwins at
Tue Dec 15 16:44:02 EST 2009

Caution: wordoffset, replace, regEx
You need to decide what constitutes a word.
In Rev,
ending ending. ending, ending?  ending!   ending)   ending]    
ending"   ending's   ending=  (ending)
are all words, so the last word in a phrase or sentence cannot be  
matched by wordoffset without a bit of rule checking for punctuation.

The same will apply to regEx since white space/punctuation rules can  

On Dec 15, 2009, at 12:56 PM, dunbarx at wrote:

> Right, thanks to all.
> Chris', your original regex question could better be addressed by:
> on mouseup
>    get fld "yourField"
>    replace yourtext with "<box>" & yourtext & "</box>" in it
>    set the htmltext of fld "yourField" to it
> end mouseup
> This would be fast, and easily extendable, since we are just crunching
> data.
> Not that there isn't a good regex solution as well...

Jim Ault
Las Vegas

More information about the Use-livecode mailing list