If a new gift membership buyer buys online, the online sales system automatically gives them a customer number that starts with a C, which if we don't delete it, ends up becoming the buyer's raiser's edge constituent ID, which we don't want. What regular expression will blank any customer number with a C? I tried this:
but can't get it to work. Below is what I have in the dictionary.
Michael, try using ^.*C.*$ on the right side instead, see screenshot below. Note that this formula will return a blank value if there is a 'C' anywhere in the string, not just the beginning - but I have a different formula for you if that needs to only ignore if it 'starts with C'
One more problem, sometimes the customer numbers contain a "-" and I want to blank those out too, can I just add ^.*-.*$ to the dictionary?
Exactly right, Michael!
Great, testing them within the dictionary itself seems to work, next time we get some data to run through it I'll keep an eye on it.
If you just want to strip-out specific characters, keep it simple. The following will remove "C" anywhere in the incoming string. If you add a hyphen as an additional 'value to match on', it will remove all "C"s and hyphens.
Replacement values: --Blank--RegEx
Values to match on: C