Match multiline text using regular expression

后端 未结 4 1520
不知归路
不知归路 2020-11-22 07:48

I am trying to match a multi line text using java. When I use the Pattern class with the Pattern.MULTILINE modifier, I am able to match, but I am n

4条回答
  •  猫巷女王i
    2020-11-22 08:00

    The multiline flag tells regex to match the pattern to each line as opposed to the entire string for your purposes a wild card will suffice.

提交回复
热议问题