I am trying to set a regular expression that contains several words in a file, where all the letters of this word match the pattern of words.
My problem is that the regular expression cannot find words with an accent, but there are a lot of accented words in my text file.
My command line is:
cat input/words.txt | grep '^[éra]\{1,4\}$' > output/words_era.txt cat input/words.txt | grep '^[carroça]\{1,7\}$' > output/words_carroca.txt
And the contents of the file:
carroça éra éssa roça roco rato onça orça roca
How can i fix this?
source share