Preg_match_all repeated group
this is my string:
zzzzzzz-------eh="koko"------eh="zizi"--------eh="mimi"--------xxxxxx
i need a reg-expression to extract koko, zizi and mimi
but eh='zizi' is optional: so if it doesn't exist like in :
zzzzzzz----------eh="koko"-----------------eh="mimi"----------xxxxxx
i should get only koko and mimi.
the '---' are some text.
i tried
preg_match_all('#zzzzzzz(.*eh="([^"]*)"){2,3}.*xxxxxx#Uix', $strg , $out,
PREG_SET_ORDER);
but it doesn't work.
No comments:
Post a Comment