I am using parsley js for validating input and I am using the data-parsley-pattern which allows me to pass in regular expression.
I am trying to validate the string to m
\S{3,}
\S{3,} match any non-white space character [^\r\n\t\f ]
Quantifier: {3,} Between 3 and unlimited times, as many times as possible, giving back as needed [greedy]
e.g. abc
or abc def
https://regex101.com/r/gO6sT3/1
That, as pointed out by Wiktor Stribiżew, only matches consecutive characters. If you mean "the input can have any number of whitespaces, anywhere, as long as there are at least three non-whitespace characters anywhere" then maybe:
.*\S.*\S.*\S.*
Anything or nothing, non-witespace, anything or nothing, non-whitespace, etc.
e.g. a b c
or ab c
or abc
https://regex101.com/r/wY0kL4/1
Also see anything and everything at the site: http://www.regular-expressions.info/