We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following example highlights differences in output of pattern matching functions between C Lua and Moonshine.
print(string.gsub('ReturnRegionNotification', '\\u.?.?.?.?', 'XXX'))
C Lua returns:
ReturnRegionNotification 0
Moonshine returns:
RetXXXgionNotification 1
I believe there's some escaping of special chars missing from the translated pattern prior to construction of the RegExp object.
The text was updated successfully, but these errors were encountered:
I just ran into the same problem. Here are two examples:
s = "-" print(string.match(s, "%-")) output: userdata (should have been "-")
s = "-"
print(string.match(s, "%-"))
output: userdata
s = "-2" print(string.match(s, "%-%d")) output: 2 (should have been "-2")
s = "-2"
print(string.match(s, "%-%d"))
output: 2
The pattern matching seems to be having trouble with the minus sign. The %d seems to work ok.
These pattern matches work fine on my regular Lua.
Sorry, something went wrong.
No branches or pull requests
The following example highlights differences in output of pattern matching functions between C Lua and Moonshine.
C Lua returns:
Moonshine returns:
I believe there's some escaping of special chars missing from the translated pattern prior to construction of the RegExp object.
The text was updated successfully, but these errors were encountered: