4 ms·
minor unwarranted tip: you don't need "|" between letters in character sets in regexps. grep "[r|R]elocate" would match "relocate", "Relocate", yes, but also "|
by codesnik 6y ago
minor unwarranted tip: you don't need "|" between letters in character sets in regexps. grep "[r|R]elocate" would match "relocate", "Relocate", yes, but also "|elocate".
You probably want
grep '[Rr]elocate'
or
grep '\(R\|r\)elocate'
or just
grep -i relocate
- xtracto 6y agoGreat feedback! Thanks.