In more detail
For example \d{3}-\d{4} matches three digits, a hyphen and four digits. Regex flavours differ slightly between languages. Very complex patterns become unreadable, and some can run catastrophically slowly on crafted input, so keep them simple on untrusted text.