4 ms·
They don't have them because most of these checks are expensive and offer little benefit outside of things like log parsing A common example is email address v
by Minor49er 4y ago
They don't have them because most of these checks are expensive and offer little benefit outside of things like log parsing
A common example is email address validation. Trying to validate that an email address is well-formed with regex will often miss valid addresses (the example you linked would miss some in the HOSTNAME portion alone). It would be better to simply send a confirmation link to the address and wait for it to be clicked since that would ensure that the address is valid
- mekster 4y agoThat's just email alone. I didn't think some milliseconds is worth more than correctness. Grok pattern is like commenting on your regexp, except you'll also get logical validation instead of bunch of characters you may make a mistake one day.
- Minor49er 4y agoIt was a simple example. As always, it depends on the application, though most applications do not need this level of checking Further, what happens if the grok pattern is wrong? Or if it changes?