<?php $re = '/(EC)\w{2}|(CC)\w{2}|\w(F)\w{2}|(LT)\w{2}|\w(T)\w{2}/'; $str = 'STAR'; preg_match($re, $str, $matches); // Print the entire match result var_dump($matches);
You have javascript disabled. You will not be able to edit any code.