S
S
Svoboo2017-06-10 20:18:42
PHP
Svoboo, 2017-06-10 20:18:42

How to use preg_match to search json string?

if (!preg_match('/'.str_replace('"', '', json_encode($s)).'/', $out)) {
                   ...
                }

It is necessary to check the absence of a substring in json format in a string. This code gives an error:
Compilation failed: PCRE does not support \L, \l, \N, \U, or \u

Tell me how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chelkaz, 2017-06-10
@chelkaz

Do you have it?
Or do you need to know if there is one array in json or more?
What does it mean: the absence of a substring in json format in a string ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question