Regex - Link formatting

偶尔善良 提交于 2019-12-11 03:52:38

问题


I have the following link in excel:

http://en.wikipedia.org/wiki/Melon_Bicycles

I would like to retrieve the link as: http://en.wikipedia.org

In google doc I used: =REGEXEXTRACT(A1; "https?:\/\/(.[^\/]+)"), whereas A1 is the cell with the unformated link.

Any recommendation how to implement that in excel 2010?


回答1:


A simple approach would be to use LEFT with FIND. Something like this

=LEFT(A1,FIND("/",A1,9))



来源:https://stackoverflow.com/questions/28832479/regex-link-formatting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!