Welcome to the community @Bilqis! You could do this as outlined in our support article Restricting Text Responses With Regular Expressions. As a sample workaround you could also have a look to the following community post discussed previously.
This post discussed previously should be very relevant to solve your issue: