I am trying to write a regex that matches the following:
first an optional “+” at the beginning, then some numbers and whitespaces in any order
I tried to use this regex (and lots of others…)
/\A[+]?([\d|\t\n\r\f])*/
However, they seem to exclude both whitespaces and letters or allow both (if there are letters in the middle).
Can anyone help me?
Seems like this is the regex that’ll work for you: http://rubular.com/r/0CgrZhEp5G