Method
extractWebsiteLinks — Extracts website links from a text.
Description
This method is used to extract website links from a given text. If one or more links are found inside a text it will extract a collection of links.
Minimum number of arguments for this method is one.
Structure of the method:
extractWebsiteLinks(text)
Parameters
text
— this is the text that will be checked for containing links inside it.
Examples
In the example below, we will show all the extractWebsiteLinks fetches a collection of links from a text.
//Fetch links from a text
{% set text = 'Flexie CRM YouTube channel here https://www.youtube.com/channel/UC1Cbx2sjvZQ8mvLOntCLvBw and Facebook Group here https://www.facebook.com/groups/2048827685373618/' %}
{% set linksList = extractWebsiteLinks(text) %}
{% for link in linksList%}
{{link}}
{% endfor %}
//Output:
// https://www.youtube.com/channel/UC1Cbx2sjvZQ8mvLOntCLvBw
// https://www.facebook.com/groups/2048827685373618/
To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.