Start a new topic

SSNs dropped leading zero

How can I make a dictionary to apply to SSNs to make sure they are 9 digits and add a zero in front of those that .csv file dropped?

Hi Therese,

Yes, this exact issue was discussed at length and with lots of good input, but for zip codes instead of SSN's. See the thread here:



This Regular Expression above will add back a dropped leading zero. Raiser's Edge should automatically insert the dashes, but here is a RegEx for that as well (see below)! If you use both of these expressions in one SSN dictionary, be sure that the one above is first with the one below second (you need to replace the dropped zero before inserting the dashes).


I also added the foillowing to account for missing double leading zeros because I had a few.
Replacement values: 00$& (RegEx)
Values to match on: ^\d{7}$
I recently worked with a team that wanted to mask the first 5 digits of the SSN, adding only the last 4 digits to Raiser's Edge. Here's what we did:
Replacement value: xxx-xx-$3
Value to match on: (\d{3})-(\d{2})-(\d{4})

Input: 123-45-6789
Output: xxx-xx-6789

*If your data file does not contain dashes, you can omit the dashes in the value to match on, like this: (\d{3})(\d{2})(\d{4})

Input: 123456789
Output: xxx-xx-6789
Login or Signup to post a comment