我必须找到字符串在 # using regex in python 之前的任何地方都没有单词(作为单词边界) abc、def 或 ghi
他是 abc 但 # 不是 xyz - 不匹配
他很好#但是很小- 比赛
他可能会 ghi 但 # 不会 abc 会- 不匹配
他会帮忙,但#希望 def 能够到来- 比赛
他打算参加 vabc 但 # 不确定- 比赛
这是包含字符串的列表
l=["he is abc but # not xyz",
"he is good # but small",
"he might ghi but # not abc will",
"he will help but # hope for def to come",
"he is going for vabc but …Run Code Online (Sandbox Code Playgroud)