I need the below requirement
string123
stringsecond
string-third
-string-four
string_five
/string/
sixstring
this should not print
output
string-third
-string-four
string_five
/string/
So as per the output,the command should not grep string followed with alphanumeric only. I am using -w option with grep ,but it is eliminating underscore(_) strings also.