I think both Derokorian and I misunderstood your description in your first post above. Let me try to clarify...
What you're wanting is to check if the given value contains between 15 and 20 numerical digits, with any number of underscores or hyphens (including 0) located at any point within that string of numbers. Is that correct?
If so, my guess at a pattern would be:
/^(?:[0-9][_-]*){15,20}$/
EDIT: Note that my pattern above stipulates that the string must begin with a numerical digit, but allows the string to end with a hyphen or underscore. If that latter bit is undesired, you could instead do something like:
/^(?:[0-9][_-]*){14,19}[0-9]$/