Start a new topic

RegEx dictionary for Sort Codes

I was recently assisting a team from the UK that needed to reformat their sort codes for bank relationships, prior to importing.  The problem was two-fold: leading zeros were dropped by Excel, and the number didn't contain the requisite dashes.  After a little work, we found a Regular Expression that would fix both of these issues.  I hope it helps you too!

 

0$& ^\d{5}$ TRUE
00$& ^\d{4}$ TRUE
$1-$2-$3 (\S{2})(\S{2})(\S{2}) TRUE


*If you have any other suggestions for handling bank info, let us know!*

Login or Signup to post a comment