,我需要将twitter.com/TWITTERUSER/status/377991264722894848转换为https://twitter.com/intent/favorite?tweet_id=377991264722894848,实际上我想知道如何设置它,以便用这个开头的https://twitter.com/intent/favorite?tweet_id=替换除末尾的推文ID号之外的所有内容
发布于 2013-09-28 17:32:18
您可能正在寻找带参数的正则表达式运算符:
item.twitter_url
.*/status/([0-9]+).*
https://twitter.com/intent/favorite?tweet_id=$1
https://stackoverflow.com/questions/18755162
复制相似问题