Match word of specific length
Clash Royale CLAN TAG #URR8PPP Match word of specific length How do I match a word of a specific length, let's say, five? Given the input file temp of text: temp 1) ci sono quattro mele 2) sentiamoci il 16 ottobre 2018 3) decidiamo il 17 ottabre 2017 4) Manipolo di eroi 5) 17 mele 6) 18 ott 2020 7) una mela e mezza 8) 2 mele If i do: awk '/[[:lower:]]{5}/ {print}' temp I would expect as output the sentence 7) , because is the only one with a word of length 5 ( mezza ). Actually, it returns every line with a word of length equal or superior than 5 . 7) 5 mezza 5 This behavior is not compatible with any source of information I consulted: The construct {n} should match exactly n times. At this point, I am afraid I am missing something obvious. {n} n Possible duplicate of Why does this regex with no special character match a longer string? – tripleee 1 hour ago ...