I'm currently learning Ampscript and SSJS for an email project. I'm trying to remove special characters to a specific object that is being called. I've came across some things that I think that could help but isnt sure how to use them.
Creating a template for an exact target email. Thought I could use the string.replace as show below. What would be some other options if any?
string = string.replace(/[^a-zA-Z0-9]/g, '');
Current code section below : the @img automatically pull content with special characters that needs to be removed before being used in the email
If RowCount(@customTemplate) != 0 Then Set @costumTemplate = True Set @img = Lowercase(Replace(@first_artist, ' ','_')) ElseIf RowCount(@locationTemplate) != 0 Then Set @locationTemplate = True Set @img = Lowercase(Replace(@venue_name,' ','_')) EndIf