I need to extract some data from the defined pattern, which is as follows:
OCC_10020811_R08_2012_13_SYH
I have to extract 'R08' out of it. I need PHP regular expression for it.
I need to extract some data from the defined pattern, which is as follows:
OCC_10020811_R08_2012_13_SYH
I have to extract 'R08' out of it. I need PHP regular expression for it.
You dont really need a regular expression for that. Try:
$pieces = explode('_', $string);
echo $pieces[2];