J
J
jtn675602016-05-27 18:56:51
PHP
jtn67560, 2016-05-27 18:56:51

php preg_match multiple pattern how to do?

required for preg_match to apply a lot of patterns. i.e. something like this

preg_match(array("/video_url:( |)('|\")(?<video_url>.*?)('|\")/ui", "/postfix:( |)('|\")(?<video_url>.*?)('|\")/ui"...), $data, $out);

how to do this? merge via | probably will not work. there will be more than 100 templates.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-05-27
@Sanasol

Do you want to put 100 regexps in one?
What will you do with it then?
Why not just check one by one?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question