Start a new topic

Regex dictionary - first word in string, then translate to other values

I am trying to make a dictionary that translates incoming data into a gift attribute. 

Incoming data will be "IHO a friend" or "IMO a friend" or something else (reference line).

What I want is:

- When incoming starts with IHO, translate to "in honor of"

- When incoming starts with IMO, translate to "in memory of"

- When incoming is neither of those, leave blank

I've repurposed a dictionary that keeps just the first character string (in this example IMO or IHO). I then added replacement values below for "in honor of" replacing "IHO" / "in memory of" replacing "IMO". That's not working, though - I still end up with IHO or IMO.

Any ideas on how to make this work, or a better way to achieve this? I think there must be a way! Here's what I have so far:


Login or Signup to post a comment