Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^https\:\/\/\w+(-my|-admin){0,1}\.sharepoint\.com((\/\w+[_\-\.']{0,}\w+){0,}[^\.](\w+[-_'\d]{0,})){0,}$
/
gm

Description

Validates SharePoint Online URLs starter regex. This regex has not been tested heavily but it's a good starting point.

Submitted by tbali - 3 years ago