PHP (Regex) - Match url part with parenthesis

前端 未结 2 962
面向向阳花
面向向阳花 2021-01-24 03:05

I am pretty new to regex (only really started looking seriously to it a few hours ago) and even if it is not going that bad... I am having a bad time matching parenthesis.

2条回答
  •  悲哀的现实
    2021-01-24 03:40

    \/\(*[A-z]+\)*\/[0-9]+$

    matches: /(offset)/29

    \/[A-z]+\/[0-9]+$

    matches: /offset/29

    Hope it helps

提交回复
热议问题