Hacker News new | ask | show | jobs
by rement 1670 days ago
Fun ASCII gotcha: [A-z] includes [ ] \ ^ _ and `
1 comments

I think this is why I usually see `[A-Za-z]` for ascii. My previous employer decidedly ignored "non-english" text.

`[A-z]` -> https://regex101.com/r/IlhPiD/1 `[A-Za-z]` -> https://regex101.com/r/iWjwf2/1

After looking it up, `\p{L}` looks like it matches letters https://regex101.com/r/1UiG9S/1.