#!/bin/bashs='This is my=test and class=76 This is my=test and class=78 This is my=test2 and \n class=76 This is my=test3 and class=75 This is my=test1 and class=79.'grep -oE '\<class=[^ ]+' <<< "$s"
Standard input is empty
class=76 class=78 class=76 class=75 class=79.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!