c# regular expression for non empty string code example Example: regex to check non empty string /^(?!\s*$).+/