I have a text:
This is my=test and class=76
This is my=test and class=78
This is my=test2 and class=76
This is my=test3 and class=75
This is my=test1 and class=79.
I want to grep all the word starting with "class=" with the values without printing the whole line the output should be:
class=76
class=78
class=76
class=75
class=79
any command that can help me on this?
I tried this :
grep -E '(^|\s+)class=(?=\s|$)' file
but was not getting any output.