Jquery to find a name on html page and add hyperlink
- by mikejones12
Here is my example:
I have a a website that contains the following:
<body>
Jim Nebraska zipcode 65437
Tony lives in California his zipcode is 98708
</body>
I would like to be able to search for zip codes on the page and wrap them with hyperlinks like:
<body>
Jim Nebraska zipcode <a href="/65437.htm">65437</a>
Tony lives in California his zipcode is <a href="/65437.htm">98708</a>
</body>
Could I use a regex selector to find the string and then wrap the string, or replace it with the new hyperlink?
I am new to Jquery and looking for someone to point me in the right direction.
Thank you,
Mike