The regex validation for client id should be the same implementation as for any other input string validations, like passwords, emails etc.
As of now, unfortunately there is no official document which talks about how to specifically do text validation for this scenario. Refer to this github issue.
For these kind of validations, custom policies or jquery validations can be helpful. Have a look at this document for claims schema pattern details for validations.
General documents are available here - doc1, doc2, Stack Overflow post. You can also refer to this as an example.
Also, I am unsure from this description if you are having a particular issue or if you are mainly just looking for documentation for implementing the validation. Please share the details of the error/issue, if you are facing any.