grep/regex can't find accented word

后端 未结 5 2006
抹茶落季
抹茶落季 2021-01-18 20:41

I\'m trying mount a regex that get some words on a file where all letters of this word match with a word pattern.

My problem is, the regex can\'t find accented words

5条回答
  •  攒了一身酷
    2021-01-18 21:36

    I found a related question here that seems to work.

    So if you try something like:

    cat input/words.txt | LANG=C grep '^[éra]\{1,4\}$' > output/words_era.txt
    

    Does that produce what you expect?

提交回复
热议问题