Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(http\:\/\/|https\:\/\/)?(?:www\.)?(?:google\.com|plus\.google\.com)\/(u\/\d+\/|u\/)?((wm\/[^\/]+)|(b\/\d{21})\/)?(\d{21}|\+[\w_\p{L}-]+)(\/[a-z]+)?\/?
/
i

Description

Pattern that check your string to match Google Plus user profile URL.

Submitted by JSC Quatrodev - 9 years ago