Open rom1504 opened 3 years ago
Some chat examples:
wvffle : meh
wvffle: meh
wvffle: meh
wvffle ~ meh
<wvffle> meh
<wvffle> meh (meh)
wvffle: (meh)
moderator wvffle: meh
[wvffle] meh
[a] [b]wvffle » meh
[a] [b] wvffle » meh
[a] ~wvffle: meh
[] wvffle - meh
from https://github.com/PrismarineJS/mineflayer/pull/2247#issuecomment-963397225
Basic username regex for hypixel: (?:|\[[a-zA-Z]{3,}\+{0,3}\] )([0-9a-zA-Z_]{1,16})
matches
0w0
[VIP] 0w0
[VIP+] 0w0
[MVP] 0w0
[MVP+] 0w0
[MOD] 0w0
We would need to make seperate regexes for the different hypixel games.
(?:\(.+?\)|\[.+?\]|.)*?(\w{3,16})
seems to fix catastrophic backtracing
There seems to be a problem with Party> IGN: message
as well
And benchmark various implementation
Probably there is a trade off between parse everything and never crash that we can propose to users