help with replacetext
Klaus Major
klaus at major-k.de
Sun Jul 1 06:48:27 EDT 2007
Hi Jim, Mark and Peter,
Am 30.06.2007 um 20:36 schrieb Jim Ault:
> I did my first answer without the "right before the suffix" part
>
> \d means digit
> [^\d] means non-digit
> [^\d\n\.] means non-digit, not linefeed and not period
>
> Using replaceText makes the task a bit difficult but here is a
> solution that
> works:
> --need to setup a condition where digits not followed by a period
> can be
> located, then purge them
> -- "[\d]+q" says locate runs of digits followed by a "q"
>
> put replaceText( tolower(tFiles5),"[^\d\n\.]","q") into tFiles6
> put replaceText( tFiles6,"[\d]+q", empty) into tFiles6
> replace "q" with empty in tFiles6
> replace "." with empty in tFiles6
> filter tFiles6 without empty
>
> or (matchChunk /or/ matchText) repeat loop to grab the positive
> matches for
> digit-followed-by-period strings
thank you very much for your input, will surely help me with my problem!
> Jim Ault
> Las Vegas
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list