Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: preg_match() return false Date: Sun, 27 Dec 2020 14:43:31 +0100 Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: individual.net yJeFtXCZfdELLuOGZ7sT0g3i1d0blz77dcmzjBH2gyfIeCUPqS Cancel-Lock: sha1:JAXbudkeXozOhsqW8TOAk6ZCMxA= In-Reply-To: Xref: csiph.com comp.lang.php:18477 alex: > $regex = file_get_contents( > // Download URç: https://files.fm/f/9mwzkn2wr > 'data/regex' > ); > $subject = file_get_contents( > // Download URL: https://files.fm/f/8xeaybz5z > 'data/subject' > ); > > $matching = preg_match($regex, $subject); > > if (0 === $matching) { > echo "Matching is 0"; > } elseif (FALSE === $matching) { > echo "Matching is FALSE"; > } else { > echo "OK!!!"; > } > > Output: > > Matching is FALSE What is the content of data/regex and data/subject? The URLs you mentioned? Why do you think that https://files.fm/f/9mwzkn2wr and https://files.fm/f/8xeaybz5z Will match? -- Arno Welzel https://arnowelzel.de