所以,伙计们,
3076482 FinalDesir [email protected] 174.5.141.202 aedcbbf6570e664723318f5e57658625:KHG5CzJ3EO/mVta?<ZR*4b%9ucb?sa
例如我有这行 ^
我想把它转换成
[email protected]:aedcbbf6570e664723318f5e57658625:KHG5CzJ3EO/mVta?<ZR*4b%9ucb?sa
答案1
- 找什么:
^(?:\S+\h+){2}(\S+)\h+\S+\h+
- 用。。。来代替:
$1:
- Replace all
解释:
^ # beginning of line
(?: # start non capture group
\S+ # 1 or more non space characters
\h+ # 1 or more horizontal spaces
){2} # end group, must appear twice
(\S+) # group 1, 1 or more non space characters
\h+ # 1 or more horizontal spaces
\S+ # 1 or more non space characters
\h+ # 1 or more horizontal spaces
给定示例的结果:
[email protected]:aedcbbf6570e664723318f5e57658625:KHG5CzJ3EO/mVta?<ZR*4b%9ucb?sa
屏幕截图: