Multiple wraps of cout "<<" using regex
I can wrap cout with one occurrence of << , like this:
cout<< "hey"; abc cin>>x; cout<< "hey";abc cin>>x; But I couldn’t wrap it correctly when it is something like this:
cout<< "hey" << "men";abc cin>>x; cout<< "hey" <<"men"; abc Regex
text = text.replace(/(cout\s*(<<[^;]*)+;)/g, '<span class="group">$1</span>'); +4