I have a line of text that looks like "...X...Y...", where X and Y are both either Ok, Empty, or Open. Using PHP, I'm trying to use preg_match() to figure out what each one is.
$regex = '/(Ok|Open|Empty)/';
preg_match($regex, $match, $matches);
print_r($matches);
However, in the case that X is "Empty", and Y is "Ok", the following line gives me two matches: "Empty", and "Empty".
What's wrong with this regex?
Thanks!