Day 10 – Clean up special characters in names

Challenge

https://ampscript30.com/ampscript-challenge-day10/

To clean up the special characters in customers’ first names.

Solution

%%[
SET @firstname = Substring(FirstName, 2)
]%%
Hello %%=v(@firstname)=%%,

Preview

Summary

There are different ways to process this cleaning up, as the special character is the first character of all customers’ first names, it’s easier to use Substring(Initial string value, character position used to begin substring) function to remove the first special character and keeping the rest of the customers’ first names.