I'm working with an SAP Information Steward and creating a rule where names will have to be in title case (i.e. each word is capitalized).
I've formulated the following rule:
BEGIN
IF(match_regex($name, '(^(\b[A-Z]\w*\s*)+$)', null)) RETURN TRUE;
ELSE RETURN FALSE;
END
Although it is successful it appears to accept inputs which should be identified as 'FALSE'. Please see the attached screenshot.

'TesT Name' and 'TEST NAME' should be FALSE but are instead passing under this regex.
Any help/guidance with the regex would be very useful.
\wmatches both cases. Change it to[a-z].^[A-Z][a-z]*(\s+[A-Z][a-z]*)*$(demo) should do.^[A-Z][a-z0-9_\-]*(\s+[A-Z][a-z0-9_\-]*)*$