\d{,4} will set an upper limit of 4 occurences for digits(max. 4 digits) and not exact 4 occurences as in \d{4} (which is appropriate for the given sample data).
See, that's why I included the "if". I couldn't remember right off if the comma should be there or not and couldn't get up the energy to dig for my reference sheet. Thanks!
Comment