I just tried to use regexp=^\d{3,4}$ with a regex validator and it threw a parse error, so I had to change it to regexp=^(\d{3}|\d{4})$
Looking at JIRA, this was fixed by Igor under TAP5-520 in 5.1.0.1, but I'm using 5.1.0.5 so it may not be as fixed as was originally thought. Should this issue be reopened again?