Here is an example function that will split the link, formatted as you describe, into separate text and URL columns:
/**
* Splits an html <a> tag into its text content and URL components
* @param {string} Format is: "Optional leading text: <a href="url">Link Text</a>"
* @returns {string[][]} 1 row by 2 column string of text and url
* @customfunction
*/
function LINKSPLIT(string) {
var split = /(^[^<]*)(<a.*a>)/.exec(string);
try {
var document = XmlService.parse(split[2]);
} catch (error) {
throw new Error("Format is: \"Optional leading text: <a href=\"url\">Link Text</a>\"");
}
var content = document.getAllContent();
if (content.length != 1) {
throw new Error("XML parser found multiple tags. Please enter a single <a> tag only.");
}
return [[split[1] + content[0].getText(), content[0].getAttribute("href").getValue()]];
}
This is written as a custom function for Google Sheets, i.e. something you can test in a cell with =LINKTEST(ROW:COLUMN)
. If you are importing the calendar events via script, then you can take this example and incorporate it into your script so that it parses the links during the import process.
https://xxxx/following
? - dwmorrin