Code: Select all
<VERSION>1</VERSION>
<TITLE/>
<AUTHOR/>
<COPYRIGHT/>
<WORDS>
<WORD dir="ACROSS" id="0" isTheme="false" num="1"/>
<WORD dir="ACROSS" id="1" isTheme="false" num="4"/>
</WORDS>
<NOTES/>
I am first testing this with RegExMatch and have an issue.
If I put the file contents directly into a variable in my code it runs fine. But when I retrieve the text from the file, it doesn't work. Here's my code:
THIS WORKS - AND THE MESSAGE BOX SHOWS "found."
Code: Select all
SrcString =
(
<VERSION>1</VERSION>
<TITLE/>
<AUTHOR/>
<COPYRIGHT/>
<WORDS>
<WORD dir="ACROSS" id="0" isTheme="false" num="1"/>
<WORD dir="ACROSS" id="1" isTheme="false" num="4"/>
</WORDS>
<NOTES/>
)
if RegExMatch(SrcString, "\<WORDS>.*?\</WORDS>")
msgbox, found
Else
msgbox not found
Code: Select all
FileRead, OutputVar, F:\test.txt
if RegExMatch(OutputVar, "\<WORDS>.*?\</WORDS>")
msgbox, found
Else
msgbox not found
Code: Select all
msgbox % OutputVar