[英]Reg Ex trying to find and replace all twitter mentions and hashtags Notepad ++
我正在尝试查找并删除所有Twitter提及(以@开头,其后为twitter用户名。字母数字字符(大写和小写字母和数字)和下划线。
此外,在下一步中,我想删除文本文件中的所有主题标签。 主题标签以#号开头,且任意数量的字符后没有空格或制表符。
我将使用记事本++查找和删除这些实例。
到目前为止,这就是我所拥有的:
@ [a-zA-Z0-9] {1,15}对于第一个有效,但是如果两次提到相同的用户名则无效。 例如:
这是我正在处理的几行文字:
posted: Sat Feb 03 2018 11:05:14 text: I should be making a killing for mining all this stale DSH coin, minergate. #bitcoin #ripple #altcoin screen_name: carlosrr24 location: Providence, RI verified: false followers_count: 629 friends_count: 139 lang: en retweet_count: 0 favorite_count: 0
posted: Sat Feb 03 2018 11:05:14 text: @cryptodailyuk @ADAcoin_ @BittrexExchange @exchange @NEWS @Bitcoin @crypto @_CryptoIQ @CharlieShrem Well done! Shut the fkn tether down! screen_name: Pascal74672564 location: Zrich, Schweiz verified: false followers_count: 6 friends_count: 16 lang: de retweet_count: 0 favorite_count: 0
posted: Sat Feb 03 2018 11:05:27 text: When @Bitcoin becomes number 2 market cap, can I call it an Alt coin? screen_name: Steven_Budgen84 location: Bahrain verified: false followers_count: 238 friends_count: 1394 lang: en retweet_count: 0 favorite_count: 0
posted: Sat Feb 03 2018 11:05:35 text: Current price of Bitcoin is $8844.61 #Bitcoin #Bithound screen_name: The_BitHound location: United States verified: false followers_count: 87 friends_count: 237 lang: en retweet_count: 0 favorite_count: 0
posted: Sat Feb 03 2018 11:05:52 text: THE MOST INNOVATIVE AND LUCRATIVE WAY TO EARN BITCOIN JOIN BITCLUB NETWORK! ! ! screen_name: toshi_mat003 location: null verified: false followers_count: 37 friends_count: 7 lang: ja retweet_count: 0 favorite_count: 0
posted: Sat Feb 03 2018 11:05:56 text: THE MOST INNOVATIVE AND LUCRATIVE WAY TO EARN BITCOIN JOIN BITCLUB NETWORK!!! screen_name: Bitclubnetwork3 location: Australia verified: false followers_count: 106 friends_count: 58 lang: ja retweet_count: 0 favorite_count: 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.