我有一个java正则表达式来获取(数字空间文本)值但是当我有一个新行时,该值没有分组,示例
正则表达式(\d{14}\s.*\n)
价值:
59105999000321 My value start
with new line number
12105999000343 AAAAAasasas asdasdasd
32105999000323 asdasxasxasx asdasd
https://regex101.com/中的组结果为:
Match 1
Full match 0-29 `59105999000321 My value start`
Group 1. 0-29 `59105999000321 My value start`
Match 2
Full match 51-87 `12105999000343 AAAAAasasas asdasdasd`
Group 1. 51-87 `12105999000343 AAAAAasasas asdasdasd`
Match 3
Full match 88-122 `32105999000323 asdasxasxasx asdasd`
Group 1. 88-122 `32105999000323 asdasxasxasx asdasd`
我有一个正则表达式,结果如下:
group 1 : 59105999000321 My value start
with new line number
group 2: 12105999000343 AAAAAasasas asdasdasd
group 3: 32105999000323 asdasxasxasx asdasd
我希望
group 1 : 59105999000321 My value start with new line number
group 2: 12105999000343 AAAAAasasas asdasdasd
group 3: 32105999000323 asdasxasxasx asdasd
我在java中怎么做?