Wrap <a> tag around phone number using jquery
<p>I'm loading a page with AJAX and would like to use Jquery to search for phone numbers (whose format is 555.555.5555) on the loaded page and wrap them with tel links:</p>

<pre><code>&lt;a href="tel:phone-number-here"&gt; &lt;/a&gt;
</code></pre>

<p>I know the parts I need to accomplish this (I think): Regex and .wrap(). I'm just not sure how to piece them together with the code I've got. I'm also not sure how to get Jquery to retain found numbers and insert them inside the tel links. Would I have to use each and $(this) with variables?</p>

<p>Here's the regex I found for identifying 7 - 10 digit numbers. I want to leave it open to various delimiters in case our site stops using periods in the future:</p>

<pre><code>^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$
</code></pre>

<p>And here's the code I'm using to load each page:</p>

<pre><code> $(".services").click(function(){  
    var loadUrl = "http://www.example.com";      
    $("#content").html(ajax_load).load(loadUrl + " #content");  
 });
</code></pre>

<p>Any help would be appreciated.</p>
