How does pattern matching work in grep for accented characters (eg. á, è, ò)
6
votes
1
answer
1128
views
What characters match the following regex :
I can match accented characters with
^[a-zA-Z]$
Specifically, should characters with accents (eg. á, è, ò) match this regex? Or just 26 lower and upper case alphabets?
I have tried to [check this](https://regex101.com/r/KN4fgg/1) in an online regex, and accented characters did not match.
When I tried it out with grep
on my Linux (Ubuntu) machine it **did match** the accented characters.
While rg
(ripgrep) **did not match** it.

rg
using [A-zÀ-ÿ]
But is there a way to exclude accented characters from matching in grep
?
PS: [This](https://unix.stackexchange.com/questions/505477/grep-to-find-a-word-matching-a-specific-pattern-and-ignore-accents) question talks about how accented chars can be included, not excluded.
Asked by adiSuper94
(61 rep)
Jul 3, 2022, 02:07 AM
Last activity: Aug 20, 2024, 01:19 PM
Last activity: Aug 20, 2024, 01:19 PM