Setting a minimum/maximum character count for any character using a regular expression

regex

Solution

Like this: `.`

The `.` means any character except newline (which sometimes is but often isn't included, check your regex flavour).

You can rewrite your expression as `^.{1,35}$`, which should match any line of length 1-35.

Problem

I am trying to write a regular expression that will be used on a text box to validate its contents to see if it is between 1 and 35. The characters within the text box can be anything: numeric, alpha, punctuation, white space, etc. Here is what I have so far: ``` ^[:;,\-@0-9a-zA-Zâéè'.\s]{1,35}$ ``` As you can see, I have to list out all characters. Is there an easier way to say "all" characters?

Original source