VS>> Почему модификатор s не работает в нижеприведенном примере? Разве VS>> не должен конец строки попадать под "."? $ pcretest VS>> ~/tmp/koshka.txt PCRE version 8.43 2019-02-23 /koshka.*sobaka/s VS>> koshka1 No match koshka2 No match sobaka No match koshka No match VS>> koshka33 VS>> No match
EG> Читаем man pcretest:
EG> Each data line is matched separately and independently. If you EG> want to EG> do multi-line matches, you have to use the \n escape sequence EG> (or \r or EG> \r\n, etc., depending on the newline setting) in a single line EG> of input EG> to encode the newline sequences. There is no limit on the
1. Опция (?s) включает режим dotall:
. any character except newline; in dotall mode, any character whatsoever
2. Почему на https://regex101.com/ работает именно так, как я ожидаю (при наличии /s токен "." означает в том числе newline), а в pcretest нет?