Example: showing lines matching a regular expression
For those times when you want a full PCRE rather than just grep
:
some_command|perl -ne 'print if /\bword\b/'
Note that you can also do this with ack
or ag
:
$ some_command|ack '\bword\b'
$ some_command|ag '\bword\b'