PHP regular expressions distinguish between two kinds of strings

/ 49265909/album/11501536/
/ album/11501536/
how to judge these two strings with regularity? How to distinguish between a number in front of it or a number without a number in front of it, and how to judge to realize the corresponding operation

Php
Mar.21,2022

preg_match("/\/\d+\/album\/\d+/","/49265909/album/11501536/")

clipboard.png

Menu