You can do that using the following regex:
/^(?!.{36,})[a-z'-]{2,}\s[a-z'-]{2,}/gmi
See this in action at Regex101
Explanation
This matches strings that suit the following criteria:
^(?!.{36,})
It is not 36 characters or longer[a-z'-]{2,}
Starts with a word containing only “a” – “z”, “‘” and “-“\s
followed by a whitespace[a-z'-]{2,}
followed by a word like decribed in 2.
you should however specify the following flags: gmi
:
g
Get all matches, not just the first onem
Treats lines seperatelyi
Match without case-sensisitivity, since this was not a requirement and would have blown up the expression a bit 😉
5
solved Set a maximum length, requirement for space and minimum characters