[SOLVED] SED print matching line
by angel115 from LinuxQuestions.org on (#5EC0V)
Hi,
I need to print all word from a file containing "e" or "e" and followed by 2 identical consonant
I've tried the following but it doesn't return the right result (although the regex work fine in regex101.com)
Code:sed -E '/[ee](b{2}|c{2}|d{2}|f{2}|g{2}|h{2}|j{2}|k{2}|l{2}|m{2}|n{2}|p{2}|q{2}|r{2}|s{2}|t{2}|u{2}|v{2}|w{2}|x{2}|z{2})/p' adjectives.txtI'm test my code against this file
Thanks for your help


I need to print all word from a file containing "e" or "e" and followed by 2 identical consonant
I've tried the following but it doesn't return the right result (although the regex work fine in regex101.com)
Code:sed -E '/[ee](b{2}|c{2}|d{2}|f{2}|g{2}|h{2}|j{2}|k{2}|l{2}|m{2}|n{2}|p{2}|q{2}|r{2}|s{2}|t{2}|u{2}|v{2}|w{2}|x{2}|z{2})/p' adjectives.txtI'm test my code against this file
Thanks for your help