3 ms·
Wouldn't a simpler solution work here? Instead of trying to validate the filter regex, show some sample IP addresses or let the user insert a set of addresses,
by Etheryte 3y ago
Wouldn't a simpler solution work here? Instead of trying to validate the filter regex, show some sample IP addresses or let the user insert a set of addresses, and then show which ones the filter matches and which ones it doesn't. Also helps address the problem of incorrect filters.
- rsstack 3y agoThe odds of the sample addresses matching is essentially zero, and adding work to the user is counterproductive.
- Etheryte 3y agoI'm not sure I agree — most common regex editing tools available online include a section for adding test strings to verify what you actually wrote is correct. Clearly there is a benefit to it. In similar vein, allowing the user to test before they commit and then test actually reduces their work load, they don't have to drop and then reload the whole regex in their mind.
- rsstack 3y agoSure, I use that when authoring and editing a RegEx. That's not the same as entry validation.