FabricMC / kotlin-fabric-discord-bot

The discord bot previously used in the fabric discord server.
MIT License
5 stars 7 forks source link

Fix only digit queries not working #38

Closed IotaBread closed 3 years ago

IotaBread commented 3 years ago

Here is an example of what I mean image

What the regex was doing was "match one digit", and it would match each digit by separate, so 1234 would match as '1', '2', '3', '4' instead of '1234'. You can check this by adding a ^ and a $ to the start and end of the regex respectively. Examples from regexr.com: image image

By adding the + at the end of the regex, what the regex does now is "match one or more of the preceding pattern". image image