title: Regex to allow only digits and "-" in WPF 2010
body: <p>I wrote Regex to allow only digits. It is <code>@"[0-9]"</code> and it works perfectly. But I would like to add a symbol "-" in regex.  I want to allow digits and "-". How to do it?)
  I've tried such mask <code>@"[0-9]\{-}"</code>  but it allows nothing. </p>
  
  <hr>
  
  <p>I have seen recently that if I input hyphen then my program does not understand as "hyphen". This is a reason why your all masks did not work. Nevertheless, they are all correct. Thanks a lot for your help. Now I will find how to read hyphen as "-" in WPF 2010. </p>