I'm converting sentences like:
Phasellus turpis, elit. Tempor et lobortis? Venenatis: sed enim!
to:
_________ ______, ____. ______ __ ________? _________: ___ ____!
using:
utf8_encode(preg_replace("/[^.,:;!?¿¡ ]/", "_", utf8_decode($ss->phrase) ))
But I'm facing a problem: Google is indexing all those empty words as keywords. I'd like to convert the original strings to something invisible to Google, like:
<span> </span> <span>  </span>, ....
using:
.parent span { text-decoration:underline; }
that is, wrapping words inside span tags, replacing words' characters with   ; and leaving untouched the special characters .,:;!?¿¡ and space.
Is this possible to solve using a regex? I actually solved this by using a non very efficient loop that scans every character of the string, but I must scan many sentences per page.