Extract & replace links from html


Hi everyone! Im trying to extract the content from HTML, and replace the anchor tag, something like that:

var exp = /(\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~|!:,.;]*[-A-Z0-9+&@#/%=~|])/i;
this.text = this.text.replace(exp,"<a (click)=‘openLink(’$1’)’ href=’#>$1");

but doesn’t works, in the template never shows the click event caller inside the link.
How can I do to open the link in a new ionic page (with iframe or inappbrowser)?

Thank you very much!!