PHP's preg_replace regex that matches multiple lines

前端 未结 2 1366
死守一世寂寞
死守一世寂寞 2020-12-01 18:13

How do I create a regex that takes into account that the subject consists of multiple lines?

The \"m\" modifier for one does not seem to work.

2条回答
  •  无人及你
    2020-12-01 18:56

    Try the 's' modifier. Meaning 'treat as if a single line'.

    'm' enables the use of ^ and $ line beginnings and endings to be used.

提交回复
热议问题