我正在玩regex与intelllij的时刻,我想知道是否有可能使用捕获来选择一个特定组的所有发生。
12 330
13 450
1223 870
1213 900
regex: (^d+) (d+)
and select the
330
450
870
900
which are in the group 2
谢谢,)
您不需要组。使用
^d+ Kd+
参见正则表达式证明。
--------------------------------------------------------------------------------
^ the beginning of the string
--------------------------------------------------------------------------------
d+ digits (0-9) (1 or more times (matching
the most amount possible))
--------------------------------------------------------------------------------
' '
--------------------------------------------------------------------------------
K match reset operator
--------------------------------------------------------------------------------
d+ digits (0-9) (1 or more times (matching
the most amount possible))