Download src/php/php-src/ext/pcre/tests/bug52971.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 696 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug52971.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug52971.phpt
-
curl -L -o bug52971.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug52971.phpt
696 Bytes
| --TEST-- | |
| Bug #52971 (PCRE-Meta-Characters not working with utf-8) | |
| --FILE-- | |
| $message = 'Der ist ein Süßwasserpool Süsswasserpool ... verschiedene Wassersportmöglichkeiten bei ...'; | |
| $pattern = '/\bwasser/iu'; | |
| preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE); | |
| var_dump($match); | |
| $pattern = '/[^\w]wasser/iu'; | |
| preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE); | |
| var_dump($match); | |
| --EXPECT-- | |
| array(1) { | |
| [0]=> | |
| array(1) { | |
| [0]=> | |
| array(2) { | |
| [0]=> | |
| string(6) "Wasser" | |
| [1]=> | |
| int(61) | |
| } | |
| } | |
| } | |
| array(1) { | |
| [0]=> | |
| array(1) { | |
| [0]=> | |
| array(2) { | |
| [0]=> | |
| string(7) " Wasser" | |
| [1]=> | |
| int(60) | |
| } | |
| } | |
| } | |