Hi folks,

I'm well acquainted with pattern matching using the str functions in VBA.

I'm wondering, however, about the viability of using regex matches instead when running through multiple ranges for the same pattern.

I'm VERY green with regex so please forgive my ignorance - if I wanted to match the following, how would it be done?

-Length must be 10 characters
- First 4 characters are letters only (no numbers)
- IF the length is not 10 digits, insert a 0 AFTER the first 4 letters for every missing digit

i.e. if I had ABCD01234 -> ABCD001234
DCBA87623 -> DCBA087623
WXYZ2354 -> WXYZ002354

What would this look like?

Thanks in advance.