Escape Regex Newline

后端 未结 2 554
轮回少年
轮回少年 2021-01-12 06:29

How would I make a \\n match in regex? I want the actual two ASCII values 92 and 110 to be matched (as a string).

I\'m using preg from PHP Thanks

2条回答
  •  难免孤独
    2021-01-12 07:05

    You can either escape the first slash: \\n

    Or wrap the first slash in []: [\]n

提交回复
热议问题