searchMatch matching " Bis " to "\s*Titel\s*" #63
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BeRo1985/flre#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When I load the text
#10#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#66#105#115#10#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32#32("Bis" with whitespace) from an HTML file and match it to\s*Titel\s*, I get a match:However, when I just match it without the HTML file, I do not get a match:
(flags case-insensitive and single line, so the regex becomes really big according to DumpRegularExpression
((?:[\x09-\x0d ]|\xc2\xa0|\xe1(?:\x9a\x80|\xa0\x8e)|\xe2(?:\x80[\x80-\x8b\xa8-\xa9\xaf]|\x81\x9f)|\xe3\x80\x80|\xef(?:\xbb\xbf|\xbf\xbe))*[Bb][Ii][Bb][Ll][Ii][Oo][Tt][Hh][Ee][Kk]|[Aa][Uu][Ss][Gg][Aa][Bb][Ee][Oo][Rr][Tt]|[Zz][Ww][Ee][Ii][Gg][Ss][Tt][Ee][Ll][Ll][Ee](?:[\x09-\x0d ]|\xc2\xa0|\xe1(?:\x9a\x80|\xa0\x8e)|\xe2(?:\x80[\x80-\x8b\xa8-\xa9\xaf]|\x81\x9f)|\xe3\x80\x80|\xef(?:\xbb\xbf|\xbf\xbe))*))Anyways, the strings are the same in either case, so it does not have anything to do with the HTML file...
If I look at
TFLRE.SearchMatch, it takes the branchfifDFAReady in InternalFlags,case .. DFAMatch:,UnanchoredStartwithStartPosition = 0, UntilExcludingPosition = 43, MatchEnd = 92. Then it takes the next exit, withMatchBegin = 64, MatchEnd = 92Which should be an impossible match, because the string is only 43 bytes long, should it not?
It calls
TFLREDFA.SearchMatchFast, and it happens with and without #58.But when I remove all the assembly and so it uses the Pascal
TFLREDFA.SearchMatchFast, it works without any problem (naturally, it only affects the 32-bit build).