Regular Expressions 101

Community Patterns

Server regex for getting directory and template name from url

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\/(?<directory_name>(?<template_name>[\w]+)[-\w]+)\/
/
gm

Description

Later.

Submitted by anonymous - 2 years ago