Just have to select Conditional Regex.
Here is what i have problem....
I just want to select time string 02:00 but not with quotation marks like "02:00" or '02:00'
I am using to select 02:00 or 2:00 Regex is
$pattern = '/(\d{2}:\d{2})|(\d{1}:\d{2})/';
preg_match_all($pattern,$content, $matches);
But is selecting this also "02:00" or '02:00' I am not sure which regex will use to skip that time string.
I got this http://www.regular-expressions.info/conditional.html But not sure how make regex :(
Please help me out.
UPDATE
Thanks for Lucas Trzesniewski and his Great Help.
I just resolved my issue with this php code.
$pattern = '/(?!["\'])\b\d{1,2}:\d{2}\b(?!["\'])/';
preg_match_all($pattern,$content, $matches);