in reply to Checking whether a string is a prefix of any string matching a given regular expression
The Regexp::Genex module based on the above transforms a regex using YAPE::Regex, you could write a similar transform to answer your question. The transformed version would have to be peppered with an illegible sequence of (?{}) terms although I don't know what form it would take. Something like:
/^(\d(\d(\d(-(\d(\d(\d$)|$)|$)|$)|$)|$)|$)/
|
|---|