I want to match a phone number that can have letters and an optional hyphen:
- This is valid:
333-WELL
- This is also valid:
4URGENT
In other words, there can be at most one hyphen but if there is no hyphen, there can be at most seven 0-9 or A-Z characters.
I dont know how to do and "if statement" in a regex. Is that even possible?