In order to split the string in substrings it is really easy... I've only had to search google for "string split" to find out this:
To convert any text to a hyperlink it is even easier: any hyperlink follows those rules: http://www.w3schools.com/html/html_links.asp
After reading that you will easily be able to split strings and to add the right text codes to the beginning and to the end in order to make them hyperlinks (see here http://www.w3schools.com/jsref/jsref_concat_string.asp
PS: all what I've done is searching Google to find this out. I'm from spain and english is not my first language... you should try it, it works and pays it back to be able to find out this kind of solutions by yourself.