Something like so: \d{2,}[Xx]\d{2,}\.
will match two or more digits, an x
(ignoring case) and two more digits and a period.
If that is all you want to match, I would recommend adding the anchor tags: ^\d{2,}[Xx]\d{2,}\.$
. This will instruct the regex engine to match exactly that.
So in short, this \d{2,}[Xx]\d{2,}\.
will match foo bar 000X00 foo bar
but this: `^\d{2,}[Xx]\d{2,}\.$
will match only 000X00
and nothing else (so it will fail for my previous example).