How to validate a LinkedIn public profile url

后端 未结 9 2895
迷失自我
迷失自我 2021-02-20 16:43

I am looking for a way to validate a link to make sure that it is pointing to a LinkedIn public profile page in PHP.

I have a website and I would like my users to be abl

9条回答
  •  隐瞒了意图╮
    2021-02-20 16:58

    Following expression will help you with all patterns:

    ((https?:\/\/)?((www|\w\w)\.)?linkedin\.com\/)((([\w]{2,3})?)|([^\/]+\/(([\w|\d-&#?=])+\/?){1,}))$
    

    Demo

    https://regex101.com/r/oT7iM2/5

提交回复
热议问题