Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
((?<=\/|=)wall|photo|video)(-?[0-9]*)_([0-9]*)(\?reply=)?((?<=reply=)[0-9]*)?
/
g

Description

This regex allows access to owner id and item id of VK url.

Submitted by MagicWinnie - 2 years ago