php - Regular Expression for preg_match -
this question has answer here:
- how parse , process html/xml in php? 27 answers
i got following string:
elftksuqmcc" alt="" width="auto" height="auto" /></td> <td style="padding: 10px;">xx,x%</t
and want have "xx,x", build following regular expression:
/qmcc" alt="" width="auto" height="auto" \/><\/td>\n<td style="padding: 10px;">(.*?)%/
i tested online , got match xx,x when try execute in php following code preg_match_all('/regex/',$string,$match);
it didn't match. have suggestions? string in there. var_dump($match)
gives me empty array.
thank you!
problem in newline. in regex, there \n
. use \r\n
instead , work.
Comments
Post a Comment