(?:\A|\G).+\R\K(.+(?:\R|\z)) \t$1. matches newline*解释:
(?: # non capture group
\A # beginning of file
| # OR
\G # restart from last match position
) # end group
.+ # 1 or more any character but newline
\R # any kind of linebreak (i.e. \r, \n, \r\n)
\K # forget all we have seen until this position
( # group 1
.+ # 1 or more any character but newline
(?: # non capture group
\R # any kind of linebreak (i.e. \r, \n, \r\n)
| # OR
\z # end of file
) # end group
Run Code Online (Sandbox Code Playgroud)
屏幕截图(之前):
屏幕截图(之后):
| 归档时间: |
|
| 查看次数: |
1545 次 |
| 最近记录: |