如何使用REGEX提取特定数字

假设我有以下字符串:

var mystring = "<:hello:123456789123456789>"

How can I extract only the numbers after the last :. If I do extract all numbers, I may encounter issues when I have the following string:

var mystring = "<:hello23:123456789123456789>"

Where it can extract 23 before last : too, and break my code.

评论