strMatches is a complete string match, even in the multi-line case. Thus your check for matching should be expected to fail.
You can however use the "strContains" function which should do what you want. Though you may want to also match beginning of line/end-of-line:
if strContains %Text% ^Y(.*)$
Notice %Return:Group:0%
else
Notice FAIL
end
Be aware that <<EOF preserves leading space on the lines, so Y must be the first character here. Also, I've output group 0 instead of 1, since group 1 is the string "et even more".
strMatches is a complete string match, even in the multi-line case. Thus your check for matching should be expected to fail.
You can however use the "strContains" function which should do what you want. Though you may want to also match beginning of line/end-of-line:
if strContains %Text% ^Y(.*)$
Notice %Return:Group:0%
else
Notice FAIL
end
Be aware that <<EOF preserves leading space on the lines, so Y must be the first character here. Also, I've output group 0 instead of 1, since group 1 is the string "et even more".