如果部分字符匹配,我会尝试捕获花括号(包括花括号)之间的字符。 我尝试了下面的正则表达式模式,但它捕获了从整个字符串中的第一个花括号和最后一个花括号开始的所有内容。 string = "The {name_of_list} list contains {list:a, b, and c}. This list should be formatted as a, b, and c."
r"(\{.*?:a, b, and c\})"gm 我想捕获"{ list :a,b,and c}",但我得到的却是"{name_of_list} li
C:\python27\python.exe: No module named scrapyTo use the MinGW compiler to build an extension module, use pythonsetup.py build_ext -c mingw64
Note that building Python extensions with MinGW is not off