Download src/php/php-src/ext/pcre/tests/bug41050.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41050.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug41050.phpt
-
curl -L -o bug41050.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41050.phpt
431 Bytes
| --TEST-- | |
| Bug #41050 (pcre 7.0 regression) | |
| --FILE-- | |
| // by legolas558 | |
| $regex = '/(insert|drop|create|select|delete|update)([^;\']*('."('[^']*')+".')?)*(;|$)/i'; | |
| $sql = 'SELECT * FROM #__components'; | |
| if (preg_match($regex,$sql, $m)) echo 'matched'; | |
| else echo 'not matched'; | |
| print_r($m); | |
| --EXPECT-- | |
| matchedArray | |
| ( | |
| [0] => SELECT * FROM #__components | |
| [1] => SELECT | |
| [2] => | |
| [3] => | |
| [4] => | |
| [5] => | |
| ) | |