regex for checking an empty string code example Example: regex to check non empty string /^(?!\s*$).+/