0

I have a form code:

%%[ 
    set @travelinterest= RequestParameter("tli")
    set @favouritebcdestination = RequestParameter("bcd")

    set @email = "[email protected]"

    UpdateDE("B2CSubscribe_AN",1,"Email",@email,"Travelinterest",Replace(@travelinterest,",",";"),"Favouritebcdestination",Replace(@favouritebcdestination,",",";"))
]%%

It is automatically retrieving and updating the values in data extension, while I am facing issue in replace function, in replace function it is replacing all commas, i want to avoid one comma, this i am facing? is it possible?

1 Answer 1

2

The Replace-function always replaces all occurrences of a string. If you want to avoid one comme you could build a regular expression, that matches your string without the commas you want to replace if that is possible for your values. Then you would use RegExMatch(1,2,3,4).

Documentation articles:

Related documentation:

3
  • Replace funtion will have to work which contains morethan seven characters in the string ,is it possible? @Markus slabina
    – user46593
    Commented Jun 28, 2017 at 6:53
  • Unfortunately I cannot give you a code example more meaningful than the one in the documentation as the regular expression greatly depends on the values in your data extension. Please check out the linked resources, try yourself and ask another question if you are stuck. Commented Jun 28, 2017 at 6:58
  • salesforce.stackexchange.com/questions/180923/… please see this
    – user46593
    Commented Jun 28, 2017 at 12:31

You must log in to answer this question.