PHP Regex Any Character

后端 未结 5 649
醉梦人生
醉梦人生 2020-12-10 01:10

The . character in a php regex accepts all characters, except a newline. What can I use to accept ALL characters, including newlines?

5条回答
  •  清歌不尽
    2020-12-10 01:27

    The PHP Manual page for Dot states that:

    If the PCRE_DOTALL option is set, then dots match newlines as well.

提交回复
热议问题