I am trying to build a regex for textarea in my angular 8 application. The textarea should allow all characters but should not allow empty character at the start. I have used 3 but both have the following problems:
^(?!\s*$).+-- This does not work if user goes to next line in the textarea using enter key.^[^\s]+(\s+[^\s]+)*$-- This does not work if there is an empty space between 2 words.^(?!\s*$)[-a-zA-Z0-9' '.,\(\)&+\/]{1,}$-- This does not work if user goes to next line in the textarea using enter key.
Can anyone help me with this?