Find some text characters
Thierry Douez
th.douez at gmail.com
Mon Jul 17 21:53:22 EDT 2017
2017-07-17 23:40 GMT+02:00 Peter Bogdanoff via use-livecode <
use-livecode at lists.runrev.com>:
> Is there a easy way to do this?:
>
> Given this htmlText that may contain Chinese characters and/or some
> horizontal tabs—
>
> 大胆的强
>
> I want to know if this data contains Chinese characters, that is an entity
> with 5 numbers between the “#” and the “;”
>
> Only data containing 5 numbers between the “#” and the “;” would return
> true. Having ONLY " ” but not the other would return false.
>
> Thanks for suggestions!
>
> Peter Bogdanoff
>
>
Hi Peter,
Mmm, not sure you'll get *only* Chinese characters,
but at least any entity with only 5 numbers.
This function returns true if find any, false otherwise:
function testForChinese T
xt
-- any htmltext
return matchText(
Txt
, "&#\d{5};")
end testForChinese
Regards,
Thierry
--
------------------------------------------------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
More information about the use-livecode
mailing list