标签: regex
我有@unique2 @someOther和@unique32 2 or more
@unique2 @someOther
@unique32 2 or more
我需要正则表达式来提取@unique之后的数字但是当我只有一个数字并且在我正在查看的字符串之后还有更多文本时(即它在空格后没有停止)时我遇到了问题< / p>
所以: @unique2 @someOther应该返回2 和 @unique32 2 or more应该返回32
所以我目前有([^@unique](\d)+)然而无法工作。
([^@unique](\d)+)
任何想法我做错了
答案 0 :(得分:1)
\@unique(\d+)
您可以在https://regex101.com/r/MAjxN2/1
我不明白为什么你在你的正则表达式中使用[^]
[^]