Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18479
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: preg_match() return false |
| Date | 2020-12-27 15:11 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <rsa4n2$1n7h$1@gioia.aioe.org> (permalink) |
| References | <rs9s7j$1vsr$1@gioia.aioe.org> <i4rhc2F21bgU1@mid.individual.net> |
Il 27/12/20 14:43, Arno Welzel ha scritto:
> 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?
>
>
Instead of the contents of the files I published the url to download
them, and consulate them more comfortably.
But I see that you didn't like this solution, so I publish them to you
directly:
$ cat data/regex
#Mock message .+¶
.+¶
.+
\-\-\-\-\-
Backtrace dettagliato\:¶
.+¶
.+#s
$ cat data/subject
Exception: Mock message in
tests/AlexSoft/Util/LoggerTextProcessing/DetailedBacktraceProcessorTest.php:31¶
Stack trace:¶
#0 vendor/phpunit/phpunit/src/Framework/TestCase.php(1526):
AlexSoft\FavoriteExceptionHandler\Util\LoggerTextProcessing\DetailedBacktraceProcessorTest->testProcess()¶
#1 vendor/phpunit/phpunit/src/Framework/TestCase.php(1132):
PHPUnit\Framework\TestCase->runTest()¶
#2 vendor/phpunit/phpunit/src/Framework/TestResult.php(722):
PHPUnit\Framework\TestCase->runBare()¶
#3 vendor/phpunit/phpunit/src/Framework/TestCase.php(884):
PHPUnit\Framework\TestResult->run()¶
#4 vendor/phpunit/phpunit/src/Framework/TestSuite.php(677):
PHPUnit\Framework\TestCase->run()¶
#5 vendor/phpunit/phpunit/src/Framework/TestSuite.php(677):
PHPUnit\Framework\TestSuite->run()¶
#6 vendor/phpunit/phpunit/src/Framework/TestSuite.php(677):
PHPUnit\Framework\TestSuite->run()¶
#7 vendor/phpunit/phpunit/src/TextUI/TestRunner.php(667):
PHPUnit\Framework\TestSuite->run()¶
#8 vendor/phpunit/phpunit/src/TextUI/Command.php(142):
PHPUnit\TextUI\TestRunner->run()¶
#9 vendor/phpunit/phpunit/src/TextUI/Command.php(95):
PHPUnit\TextUI\Command->run()¶
#10 vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()¶
#11 {main}
-----
Backtrace dettagliato:¶
Array¶
(¶
[0] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestCase.php¶
[line] => 1526¶
[function] => testProcess¶
[class] =>
AlexSoft\FavoriteExceptionHandler\Util\LoggerTextProcessing\DetailedBacktraceProcessorTest¶
[type] => ->¶
)¶
¶
[1] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestCase.php¶
[line] => 1132¶
[function] => runTest¶
[class] => PHPUnit\Framework\TestCase¶
[type] => ->¶
)¶
¶
[2] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestResult.php¶
[line] => 722¶
[function] => runBare¶
[class] => PHPUnit\Framework\TestCase¶
[type] => ->¶
)¶
¶
[3] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestCase.php¶
[line] => 884¶
[function] => run¶
[class] => PHPUnit\Framework\TestResult¶
[type] => ->¶
)¶
¶
[4] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestSuite.php¶
[line] => 677¶
[function] => run¶
[class] => PHPUnit\Framework\TestCase¶
[type] => ->¶
)¶
¶
[5] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestSuite.php¶
[line] => 677¶
[function] => run¶
[class] => PHPUnit\Framework\TestSuite¶
[type] => ->¶
)¶
¶
[6] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/Framework/TestSuite.php¶
[line] => 677¶
[function] => run¶
[class] => PHPUnit\Framework\TestSuite¶
[type] => ->¶
)¶
¶
[7] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/TextUI/TestRunner.php¶
[line] => 667¶
[function] => run¶
[class] => PHPUnit\Framework\TestSuite¶
[type] => ->¶
)¶
¶
[8] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/TextUI/Command.php¶
[line] => 142¶
[function] => run¶
[class] => PHPUnit\TextUI\TestRunner¶
[type] => ->¶
)¶
¶
[9] => Array¶
(¶
[file] => vendor/phpunit/phpunit/src/TextUI/Command.php¶
[line] => 95¶
[function] => run¶
[class] => PHPUnit\TextUI\Command¶
[type] => ->¶
)¶
¶
[10] => Array¶
(¶
[file] => vendor/phpunit/phpunit/phpunit¶
[line] => 61¶
[function] => main¶
[class] => PHPUnit\TextUI\Command¶
[type] => ::¶
)¶
¶
)¶
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 12:47 +0100
Re: preg_match() return false tony@mountifield.org (Tony Mountifield) - 2020-12-27 12:50 +0000
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 14:21 +0100
Re: preg_match() return false Arno Welzel <usenet@arnowelzel.de> - 2020-12-27 14:43 +0100
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 14:59 +0100
Re: preg_match() return false Arno Welzel <usenet@arnowelzel.de> - 2020-12-28 15:16 +0100
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 15:11 +0100
Re: preg_match() return false Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-12-27 15:33 +0000
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 16:50 +0100
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-27 17:14 +0100
Re: preg_match() return false Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-12-28 02:02 +0000
Re: preg_match() return false alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-28 10:38 +0100
Re: PHP_EOL (was: preg_match() return false) "J.O. Aho" <user@example.net> - 2020-12-28 15:43 +0100
Re: PHP_EOL alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-29 15:55 +0100
csiph-web