我有一个文本文件,我需要从中提取特定的数据元素(将其添加为新行的人的全名):
ID:363712^CLARK/DEJA G^:e30276c2f826febd3784958:KZxhnbUUouxvMrTEYfGnDZ7YcGjPh
ID:363713^LUTZ/ANTON A^:84cF6F48eAc2b5E223Bf1703:ZD4LLGMqNyNYYtjLycdEds23A2
ID:363714^OATO/GINA D^:GnDZ7YcGjPh6Ru7cEjfQGZgD:GMqNyNYYtjLycdEdcxRijNc7G
我想提取:
DEJA G CLARK
ID:363712^CLARK/DEJA G^:e30276c2f826febd3784958:KZxhnbUUouxvMrTEYfGnDZ7YcGjPh
ANTON A LUTZ
ID:363713^LUTZ/ANTON A^:84cF6F48eAc2b5E223Bf1703:ZD4LLGMqNyNYYtjLycdEds23A2
GINA OATO
ID:363714^OATO/GINA^:GnDZ7YcGjPh6Ru7cEjfQGZgD:GMqNyNYYtjLycdEdcxRijNc7G
问候
(.+\^)(.+)(\/)(.+)(\^.+)
$4 $2\n$1$2$3$4$5
前
后
^.+?\^(.+?)/(.+?)\^.+$
$2 $1\n$0
. matches newline
解释:
替代品:
截图(之前):
截图(之后):