We have a use case where we’re pulling in a url from Salesforce CRM which contains the entire A tag. We’re looking to use Substring but can’t pull in the end of the URL before the quote.
- “” target=” won’t work,
- " target=" produces a quote at the end
- We’ve tried single quotes: ‘ “ target= “ ‘ with no luck.
Any ideas on how to extract the url below between the quotes to render in a call to action button in an email?
Request__c:Site_URL__c = <a href=”https://mycervello.com/?requestid=a0Y2i000003Upy0BBB&signature=%2HH2RWnDntoo3CmmyAySPy1qNvwoiTuTrubI8ovMv7aU%2D” target="_blank">Click here for the form</a>
Ampscript:
SET @emailLinklong= [Request__c:Site_URL__c]
SET @DP_StringBegin = " target="
SET @emailLink = Substring(@emailLinklong,10,Subtract(IndexOf(@emailLinklong,@DP_StringBegin),1))