jQuery Regex, Word with Apostrophe

Hi guys,

I asked a question earlier on about some sort of javascript that would allow me to surround the first word of H1 and H2 tags with a span and a class.

The post in question is:

I was provided with the following code snippet:

/* Function to assign a class to the first word of every H1 and H2 tags */
jQuery(function($) {
$('h1, h2').each(function() {
var obj = $(this);
obj.html(obj.html().replace(/^(\w+)/, '<span class="header-highlight">$1</span>'));

This snippet performed as expected at first, and still mostly does. With the exception that I notice the \w regex indicator doesn't support apostrophes.

So if a H1 tag begins with the word "We'll" the span will become:

<h1><span class="header-highlight">We</span>'ll Contact You Soon!</h1>

I could see the same thing happening with Hyphen's (-'s) occasionally too.

I've gone through stackflow about this problem a lot and tried a lot of different options I found there. I've even tried hacking it together on my own from jQuery/Javascript and Regex documentation, but to now avail.

So my question is, how do I modify the above snippet to account for apostrophes and hyphens?

I would like the span to surround words that have apostrophes and hyphens in them if possible.