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

crashes using regex replace that don't have the correct group count silently fail #148

Closed
budak7273 opened this issue Oct 13, 2024 · 2 comments · Fixed by #155
Closed

crashes using regex replace that don't have the correct group count silently fail #148

budak7273 opened this issue Oct 13, 2024 · 2 comments · Fixed by #155
Assignees
Labels
bug Something isn't working

Comments

@budak7273
Copy link
Member

budak7273 commented Oct 13, 2024

works:
((?:low.?ms)|(?:nitro.?serv\b)|(?:shockbyte)|(?:4.?net.?players)|(?:GTX.?Gaming)|(?:(?<!\w)g.?portal)|(?:Super.?craft))

silently fails:
(?:low.?ms)|(?:nitro.?serv\b)|(?:shockbyte)|(?:4.?net.?players)|(?:GTX.?Gaming)|(?:(?<!\w)g.?portal)|(?:Super.?craft)

...when this response is used:

You just mentioned the name of a hosting provider ({1}) that does NOT support modded Satisfactory dedicated servers! Check the list here to learn more. https://docs.ficsit.app/satisfactory-modding/latest/ForUsers/DedicatedServerSetup.html#UnsupportedHosting
Rule logic: https://regex101.com/r/rKL6oV/
@budak7273 budak7273 converted this from a draft issue Oct 13, 2024
@Borketh
Copy link
Member

Borketh commented Oct 13, 2024

See experimentation here for complete confusion. Will need to look at the code later, but it seems the first group changes depending on the regex itself (which makes this hard for end users to write well) and we only pass the first group for all arguments?? It's borked six ways from Sunday.

@Borketh Borketh self-assigned this Oct 13, 2024
@Borketh Borketh added the bug Something isn't working label Oct 13, 2024
@Borketh
Copy link
Member

Borketh commented Oct 27, 2024

# ok who wrote this unreadable garbage? oh wait, it was me - Borketh
# this should probably be simplified...

oh no

@Borketh Borketh mentioned this issue Nov 1, 2024
@Borketh Borketh linked a pull request Nov 1, 2024 that will close this issue
@Feyko Feyko closed this as completed in ad3fe5c Nov 1, 2024
@Feyko Feyko closed this as completed in #155 Nov 1, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Completed in FICSIT-Fred Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants