First off, thank you for not shoving AI into Adaxes and for continuing to improve it.
I'm trying to set property pattern validation for new user creation and I'm a little stuck.
Specifically, I want to make sure that the data entered:
- doesn't start with a space
- doesn't end with a space
- doesn't contain a 'smart' quote (‘ ’ “ ”)
- no double (or more) spaces
I did see I could impose the "must not start/end with" but that doesn't solve #3 and #4
Regex looks good but maybe I'm not quoting it properly? This does work for #1 and #2 but doesn't work for #3 unless there's two 'smart' quotes next to each other
^[^\s][^\‘\’\“\”]+[^\s]$

I had tried this which didn't work for #3 either because it seems to see it as this string "‘’“”", regex101.com reckons it needs to be escaped like above.
^[^\s][^‘’“”]+[^\s]$
I haven't been able to figure out #4 multiple spaces cause adding \s{2,} doesn't work.
I could use Powershell validation but I'd prefer to have it on the form itself as then when the user is entering the data it tells them why it's an issue.
Am I just testing against the wrong flavor of regex? It does look like \‘\’\“\” would be incorrect for .NET because it doesn't need the backslashes but I tested with that and had the same issue of needing at least two 'smart' quotes to trigger the error message.
Any assistance is much appreciated