Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regex example to "Match detection for URIs" that is not broken
I find it important that examples actually follow best practices. The current regex one is not for two reasons: 1. Not escaping dots in URIs when writing regex is a mistake that is often made, even by advanced regex people. I think this comes from the way we humans look at URIs. Dots are so common in there, aren’t they? Yes, but we write proper regular expressions here, not something in between. 2. `^https://.*google\.com$` is an improper regex (as already pointed out because it also matches `malicious-site.com`) that is only there to show the weaknesses of regular expressions for this use case. I find such an example very good for this purpose but there should also be a "good example" that complements it. I found such a "good example" that I hope is more useful and has no unwanted loopholes. Updates: bitwarden#41 Replaces: bitwarden#160
- Loading branch information