Regex code for 2 words that start with the same letter

How about this regex:


This regex check string contains only 2 words (In regex definition, word is \w metacharacter)
And the first character in first word is a capture group, and it is needed to repeat in the first character in second word.

Browse More Popular Posts

Leave a Comment