livecode - How to search hyphenated words -
how search hyphenated words eg(alexander-great) if word present in search list output should alexander-great:1 here 1 indicate how many time particular word present in main scrolling field using following code.
on mouseup put fld"mytextfield"into mytext put fld "srtext" mydata split mydata cr , colon put keys of mydata mydata repeat each words myword in mytext if myword among words of mydata if mycounts[myword] empty put 1 mycounts[myword] --answer "haii" else add 1 mycounts[myword] end if end if end repeat combine mycounts cr , colon put mycounts
please use code
if myword contains words of mydata
instead of
if myword among words of mydata
Comments
Post a Comment