Start a new topic

Regular Expressions - Inserting Characters

I need to insert hyphens into an eight (8) digit employee ID number.  For example, if my employee ID is 12345678, I need it to import as 123-45-678.  This would be very similar to adding a hyphen into a nine (9) digit SSN.
1 Comment

Hey Patrick,

I was curious about this one, so found this after some googling:

Using their phone formatting RegEx as a guide, I was able to come up with this:


The replacement value is: $1-$2-$3
The values to match on are: (\d{3})(\d{2})(\d{3})


Login or Signup to post a comment