How would I go about wrapping a section of text in a paragraph with a span. For instance, in:
<p class="info"> Posted by johnny, 20/07/2012 4:47pm (3 days ago) </p>
I would like to be able to wrap the poster’s name with a span, this is not necessarily always going to be 1 word, it could be John Smith, or John H Smith.
Basically I want to wrap whatever comes after “Posted by” and before the last comma (,) in the paragraph.
I would assume regex is the way forward but I’ve never touched this before.
Here’s the fiddle: http://jsfiddle.net/9Urph/