I have a string, for example:
black-guitar-12-strings-7584
And I am trying to match the set of digits at the end (not always 4 in length).
So far I have:
(-)[^-]*$
Which matches the last part but I don’t want to include the last hyphen also.
Any ideas? thanks.
Try this pattern:
\d+$or[0-9]+$. It matches last sequence of digits.