Are Data Extension variables merged before AMPScript is run? E.g. I want to see if a data extension variable for the current recipient contains part of a string:
%%[
var @result
SET @result = RegExMatch("A String", ".*(\|%%DATAEXT_VAR%%\|).*", 1)
IF Length(@result) > 0 THEN]%%
... show HTML here ...
%%[ ENDIF ]%%
This doesn't work. Does the regular expression need assembling using CONCAT
, or the variable needs to be accessed via Field()
or similar? I have not found documentation covering this.