I'm trying to get the digits from a url with an optional ending
/^\/course\/(\d+)\/view/
The /view
part is optional.
I've tried various combinations of (..)? around it but can't get it to work.
Any help appriciated.
I'm trying to get the digits from a url with an optional ending
/^\/course\/(\d+)\/view/
The /view
part is optional.
I've tried various combinations of (..)? around it but can't get it to work.
Any help appriciated.