Now I have NEVER played around with WILDCARD expressions, not even with HyperCard before the dinosaurs were around.I am doing the above and struggling with an oddity that I can’t find guidance on on Livecode or wider wildcard stuff
A simple example is I am searching text messages for 'with you' or 'with u’
so I use the wildcard form
*with [you,u]*
That finds all examples of both just fine. However, it also finds ‘with unlimited cheese’ and 'with us’, ‘with yours’ etc. so I want a space after both u
When I put two spaces inside the square brackets after each string, the search still works but spaces seem to be ignored (so still finds the above resamples I don’t want).
If I put a single space after the brackets the first bracketed string is ignored and the filter only finds “with u “
BUT, this peaked my
interest, and here is my way of doing this:
- -
The script in the button:
Code: Select all
on mouseUp
put empty into fld "fPERKED"
put 1 into LYNE
repeat until line LYNE of fld "lf" is empty
put line LYNE of fld "lf" into PROCK
if matchText(PROCK,"with u$") then
put (PROCK & cr) after fld "fPERKED"
end if
if matchText(PROCK,"with you$") then
put (PROCK & cr) after fld "fPERKED"
end if
add 1 to LYNE
end repeat
end mouseUp