repeat for each line temp in tAnswers
put 0 into nCount
if matchtext(temp,"*" & char 1 of tGuess & "*") then
add 1 to nCount
end if
I get an Error in the third statement
Matchtext - looking for chars in each line of a list of word
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9824
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Matchtext - looking for chars in each line of a list of
What does the error say?SethMould wrote:I get an Error in the third statement
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Matchtext - looking for chars in each line of a list of
The problem is runtime, and in the matchText line.
Does this make sense:
Craig Newman
Does this make sense:
Code: Select all
if matchtext(temp, char 1 of tGuess & "*") then
Re: Matchtext - looking for chars in each line of a list of
Hi Seth
I think you need to specify what the * is allowed to match, so something like
This resource, which Charles Buchwald pointed to in the Dictionary comments, is really useful
http://www.regextester.com/index.html
I hope that helps.
Kind regards
Elanor
I think you need to specify what the * is allowed to match, so something like
Code: Select all
put matchtext(temp,"[a-zA-Z]*" & char 1 of tGuess & "[a-zA-Z]*")
http://www.regextester.com/index.html
I hope that helps.
Kind regards
Elanor
Elanor Buchanan
Software Developer
LiveCode
Software Developer
LiveCode