Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
.*(?:(?<=\/)|^)([a|g|amp|gmp]\d+)[\.]?(?:[\w-]+)?.*
"
gm

Description

Regex for extracting display_id from the URL

Submitted by anonymous - 6 years ago