Test, validate and match regular expressions
Matches entire lines or strings that neither begin nor end with a Unicode space separator character (\p{Z}, covering spaces, non-breaking spaces, and ideographic spaces). A negative lookahead rejects strings starting or ending with such separators, effectively validating trimmed input. Useful for Unicode-aware form validation and sanitization checks. Requires the u flag for Unicode property escapes, m for line-by-line matching, and g for all matches.