Answer the question
In order to leave comments, you need to log in
Case insensitive in preg_match_all?
Hello.
Interested in such a question, there is a base of the form:
$base = "Hi:hi".
"testik:Toaster".
"hi:HI"; // base just as an example
$text = "hello";
It is necessary that through preg_match_all('@\b'.$text.'\:(.*)@', $base, $answer);
Printed both values case insensitively.
If you try now, then the case is taken into account and will display "HIGH".
Answer the question
In order to leave comments, you need to log in
preg_match_all('/\b'.$text.'\:(.*)/i', $base, $otvet);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question