Regular Expressions 101

Community Patterns

Linkedin profile matching regex

1

Regular Expression
PCRE (PHP <7.3)

/
^(http(s)?:\/\/)?([\w]+\.)?linkedin\.com\/(pub|in|profile)
/
gm

Description

This a regex for matching linkedin profile URLs

Submitted by @antespi - 10 years ago