Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?:^([sS][mM][bB]\:\/\/(?:(?:[^@\\\/]+(?:\:[^@]+@)[^@\\\/\?]+)|(?:[^\\\/?]+)))\/([^\\\/]+)(?:[\\\/]([^?\:]*))?$)
"
gm

Description

smb://[[domain;]username[:password]@]hostname[:<port>]/share[/]path

Submitted by anonymous - 6 years ago