Skip to content
New issue

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

Collect examples of chat to parse and build a benchmark #51

Open
rom1504 opened this issue Nov 13, 2021 · 3 comments
Open

Collect examples of chat to parse and build a benchmark #51

rom1504 opened this issue Nov 13, 2021 · 3 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Nov 13, 2021

  • easy examples
  • hard examples
  • crashing examples

And benchmark various implementation

Probably there is a trade off between parse everything and never crash that we can propose to users

@u9g
Copy link
Member

u9g commented Nov 13, 2021

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 PrismarineJS/mineflayer#2247 (comment)

@U5B
Copy link
Contributor

U5B commented Dec 3, 2021

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.

@Chitasa
Copy link

Chitasa commented Dec 22, 2021

(?:\(.+?\)|\[.+?\]|.)*?(\w{3,16}) seems to fix catastrophic backtracing

There seems to be a problem with Party> IGN: message as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants