hon如何从spark中给定的字符串中找到特定的句子?

w41d8nur  于 2021-05-27  发布在  Hadoop
关注(0)|答案(0)|浏览(434)

我想从spark中的字符串中提取一个特定的部分
例如,我的弦是

val b= "URL ftp://216.24.126.75/serversoftware/ocs/OCS_Inventory_NGInstallation_and_Administration_Guide_1.7_EN.odt
MENTION cryptography    201564  http://en.wikipedia.org/wiki/Cryptography
MENTION digital signature   201870  http://en.wikipedia.org/wiki/Digital_signature
TOKEN   decide  153579
TOKEN   Analyze 160938
TOKEN   properly    140437
TOKEN   reselect    78017
TOKEN   writing 60758 "

我想要这样的输出:

(ftp://216.24.126.75/serversoftware/ocs/OCS_Inventory_NGInstallation_and_Administration_Guide_1.7_EN.odt,http://en.wikipedia.org/wiki/Cryptography)
(ftp://216.24.126.75/serversoftware/ocs/OCS_Inventory_NGInstallation_and_Administration_Guide_1.7_EN.odt,http://en.wikipedia.org/wiki/Digital_signature)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题