Matches if the current position in the string is not preceded by a
match for .... This is called a negative lookbehind assertion. Similar
to positive lookbehind assertions, the contained pattern must only
match strings of some fixed length. Patterns which start with negative
lookbehind assertions may match at the beginning of the string being
searched.
对于任何不以[0或x]开头的内容,它看起来都是非捕获组。你知道吗
你试过从后面看一眼吗?你知道吗
(我花了很长时间才在电话里打这个,现在我看到有人已经整理好了。经验教训:电话里没有regex。)
正则表达式中的
[^(0x)]
匹配任何不是(
、0
、x
、)
的字符。你知道吗使用负向后看:
从http://docs.python.org/2/library/re.html
更新
使用以下正则表达式:
相关问题 更多 >
编程相关推荐