I'm doing parsing some data from HTML codes using preg_match_all()
function. in order to make it easier, I use regex tool to do it.
so, my pattern is like:
<td class="(weekday|weekend) reservation (primary|alternate) fixwidth calday fixwidth " >(.*?)</td>
when I use it in regex tool I got the result. but when I put into preg_match_all()
function, I did not get the result. I've tried running it on online PHP function tester (functions-online.com/preg_match_all.html), the pattern give null result with the message unknown modifier 'w'
.
sorry.., this is how I call use preg_match_all function:
preg_match_all('|<td class="(weekday|weekend) reservation (primary|alternate) fixwidth calday fixwidth " >(.*?)</td>|', $v, $matches3, PREG_PATTERN_ORDER);
what makes it has different result? and how to get result using preg_match_all()
with that pattern?
I hope somebody help me. Thanks before.