(?<!...) 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.
将
re.split
与负lookbehind表达式一起使用:您需要使用regular expressions。在
从链接:
可以使用正则表达式拆分,也可以使用look-behind表达式来确保不会在前面有逗号的空白字符上拆分:
相关问题 更多 >
编程相关推荐