Regular Expressions 101

Library entries

Extraneous slashes in pathnames

Vote

1

Regular Expression
pcre

~
(?P<leading> (?<=^/) /+ (?# Matches extra slashes after the first one) ) | (?P<middle> (?<!^) (?<=/) /+ (?!$) (?# Matches extra slashes in the middle of the path) ) | (?P<trailing> (?<!^) /+ (?=$) (?# Matches all trailing slashes) )
~
gmxX

Description

Loading markdown...
Submitted by anonymous - 3 years ago