标签: regex apache-pig
我正在尝试使用正则表达式来过滤不以-<single digit number>
-<single digit number>
例如: 匹配:
-1000 666er4-34234-999j dkwo-67
不匹配:
asd-ertt-1234-2 111-2222-0 -7
答案 0 :(得分:1)
您需要使用锚点
^(?!.*-\d$).+
请参阅a demo on regex101.com。