Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-04-27 07:35
Flavor·PCRE2 (PHP)

/
(?i)(?<=\/)pathElement(?=\/)
/
gm
Open regex in editor

Description

A regular expression that matches a specific path element in an URL (case-insensitive).

Useful for apache LocationMatch-Direktive, e.g. <LocationMatch "(?i)(?<=\/)pathElement(?=\/)">

Submitted by René Link