hiliting all instances of a string in a field

Dar Scott dsc at swcp.com
Wed Mar 3 17:05:04 EST 2004


On Wednesday, March 3, 2004, at 10:21 AM, Trevor DeVore wrote:

> Has anyone written a function that will find all instances of a string 
> in the htmlText of a field EXCEPT if it appears in a tag such as 
> <a></a>?  I need to hilite all instances of the string in the field.  
> I figure I'm either missing a really obvious function already in Rev 
> that will do it or I need a fancy regular expression.

Trevor, as usual, I forgot to read the subject.

You can get the text not the htmlText and go through that.  Check the 
text properties of each one back in the field to see if it is a link.  
Do the highlighting thing (whatever you want), if it is not.  (If you 
don't have access to the original field, use a temporary or hidden 
field.)

Dar doing-it-the-hard-way Scott



More information about the use-livecode mailing list