Regular Expressions 101

Community Patterns

URL - use string between last 2 / to form new URL

0

Regular Expression
PCRE (PHP <7.3)

/
<a href="https:.*(\/)([^\/]+)(?:(?=\/"))\/
/
gim

Description

used when saving a site locally This will replace internet links with local ones from the folder you've saved the site in.

Submitted by anonymous - 4 years ago