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
I've simply used the following regex:
http(s)?:\/\/([w]{3}\.)?linkedin\.com\/in\/([a-zA-Z0-9-]{5,30})\/?
According to the latest Linkedin documentation custom profile url can have 5-30 letters or numbers.
It works for the following list of url:
https://www.linkedin.com/in/your-profile-5-30-length/
https://linkedin.com/in/your-profile-5-30-length/
http://www.linkedin.com/in/your-profile-5-30-length/
http://linkedin.com/in/your-profile-5-30-length/