Find consecutive duplicate words (using REGEX)

preview_player
Показать описание
In this video I describe the process to write a shell script to highlight consecutive duplicate words in a file. To do so, we use regular expressions, grep and ripgrep.

Writing the same word twice without noticing is a common issue we encounter when we write long articles. Executing this script to highlight these words can save you a lot of time to make sure you don't submit a paper with these duplicate words.
Рекомендации по теме
Комментарии
Автор

EDIT: \w matches any "word character" (letters, digits, etc.), not any word!! That's why we need to add the "+" quantifier to match a word

vimlife