I am dealing with a spambot and in order to prevent its nonsense posts I have determined that it always posts in a specific manner of [8 characters a-zA-Z] [9 characters a-zA-Z] [10 characters a-zA-Z] …
I want to capture this exact pattern so I can block it.
An example looks like this:
EifnBTVK zljhGBZty poozgzbdax JZBnNbbpt rbpdig LfpMXMEDqay LfjrLSDQ saxaUBPlc NjflPITJ gccuOZJph
I’m thinking it’s something like
/^[a-zA-Z]{8}[a-zA-Z]{9}[a-zA-Z]{10}.*/
Is that the right line of thinking?
You need to match additionally the empty space between those “words”:
\sis a whitespace characterYou can simplify your expression further by using the
imodifier for case insensitive matching