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.
\/\(*[A-z]+\)*\/[0-9]+$
matches: /(offset)/29
\/[A-z]+\/[0-9]+$
matches: /offset/29
Hope it helps
Use this regex:
\/\(offset\)\/\d{2,3}
Demo:http://regex101.com/r/tZ7zS4