这个问题可能已经被问过了,但到目前为止我已经找到了解决办法。在
我想匹配包含inhibition(.+)toxicity
的字符串,但我不想匹配growth inhibition(.+)toxicity
。在
我尝试了(!?growth )inhibition(.+)toxicity
,但它返回我要排除的字符串。但是,使用(!?growth)
将返回除包含growth的字符串之外的所有内容。在
我不明白我对这个正则表达式做了什么错误。在
编辑:添加示例
我要加工的字符串:Inhibition of recombinant human TNF-alpha-induced cytotoxicity of mouse L929 cells
我不想匹配的字符串:Evaluated for the inhibitory concentration required to cause growth inhibition of A427Mer- cell line of lung using the MTT Cytotoxicity Assay
语法错误。正确的正则表达式是:
看看Regex Tutorial - Lookahead and Lookbehind Zero-Length Assertions。在
相关问题 更多 >
编程相关推荐