我有以下输入
st="""
I need 2 position Urgent 400-500$. It would be a
Programmer($ 500 ~ $ 1000) or Software and Business Analyst Manager salary in range 1k-1.2k with IT Manager Urgent 900-1,000$ 3 positions 3positions
"""
我希望只获得我在https://regex101.com/r/owE3A3/5中尝试过模式的薪水,它产生了我想要的结果,但是当我在Python上实现时,似乎无法使用Negative Lookahead表达式。这是我的代码段
pattern= re.compile(r'(?!(\d\s*?positions?))[0-9]?[0-9,.]+')
print(pattern.findall(st))
#output ['', '', '', '', '', '', '', '']
你可以给一些建议忽略具有特定字符串的数字吗?任何答案都会得到满足