Trying to write some regex to validate a string, where null and empty strings are not allowed, but characters + new line should be allowed. The string I'm trying to validate is as follows:
First line \n
Second line \n
This is as far as i got:
^(?!\s*$).+
This fails my validation because of the new line. Any ideas? I should add, i cannot use awk.
^[^\r\n]*?\S.*$or at the very least (if it's a simple thing of true/false that you're trying to get^[^\r\n]*?\S)