ID:2776427
 
Resolved
Regression: Case-insensitive regular expression matches were broken.
BYOND Version:514
Operating System:Windows 10 Pro
Web Browser:Firefox 97.0
Applies to:Dream Daemon
Status: Resolved (514.1583)

This issue has been resolved.
Descriptive Problem Summary:
After 1582, regex.Find now occasionally returns improper results when the haystack has unicode characters.

I haven't looked into it too much, but changing the pattern in the repro code from "(tbh|tfw)" to "tbh" or "tfw" does not trigger the bug.

Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/test_findtext()
var/regex/regex = regex(@"(tbh|tfw)", "i") usr << "match: [regex.Find("i managed to get the dude up but they keep escaping with severe brain trauöa")]"


Expected Results:
match: 0

Actual Results:
match: 11 (The position of the first "t", adding more before "to" will increase the number)

Does the problem occur:
Every time? Or how often? With the pattern in the repro case, it returns an incorrect match every time on the given message
In other games? Yes
In other user accounts? Yes
On other computers? Yes

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
This bug does not occur on servers before 514.1582.
Lummox JR resolved issue with message:
Regression: Case-insensitive regular expression matches were broken.