On 11/14/08 1:55 PM, "Mark Swindell" <[EMAIL PROTECTED]> wrote:
> What would be the most efficient structure and syntax to achieve the > following?: > > A text field containing several paragraphs. I want to run through the > field, finding and formatting certain strings, all occurrences of a > list of certain letter combinations: > > example, all occurrences of > "ck" = bold > "ch" = bold > "oa" = underline > "oo" = underline > etc. > > The repeat loops I have tried run slowly and there are too many > unnecessary passes (it seems). I know there must be a more succinct, > efficient statement that should work. > Since you don't give any example of the code you are using, I am going to make a few assumptions. Try the idea of... 1) put the field into a variable 2) replace " ch " with "<font><bold> ch </bold></font>" in variableTxt (note spaces around ' ch ' in order to locate only words) .. and after all the replacements were completed, set the htmlText of field "textBlock" to variableTxt Hope this helps, Jim Ault Las Vegas _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
