loading...

re: Checking if an input is empty with CSS VIEW POST

FULL DISCUSSION
 

Hi Zell, great article!

This regexp should work: \s?\S+.*

it means: 1 optional space followed by at least one non space followed by whatever.

I tested it and:

  • one space = red
  • one space followed by one non space = green
  • more than one space followed by anything = red
  • spaces between chars = green
 
code of conduct - report abuse