You need to bind the string to ^ (beginning of line) and $ (end of line). Otherwise, your string will match if any part of it matches.
In addition, you need at least one of these characters (you do not want to match an empty string, so you must use + (one or more).
Finally, you can make a character class from all of your characters: [\d*#+] .
Combining all this, you will receive:
private const string PhoneNumberRegex = "^[\\d*#+]+$";
This means that from the beginning of the line to the end, you need one or more of the characters you list.
source share