我遇到了下面的代码,我想知道小圆圈/度数标志意味着什么。该代码应该在项目1A和项目B之间提取文本。谢谢!
(?s)(?i)°Item 1A.*?°Item
答案 0 :(得分:0)
度数符号°
被视为要匹配的文字字符。您的输入可能如下所示:
°Item 1A: Giraffes. Girrafes are taller than anteaters.
°Item 1B: Elephants. Elephants are taller than anteaters.
°Item 1C: Ants. Ants are shorter than anteaters.
因此,您的正则表达式会在°Item1A
处开始匹配并继续第一个°Item
。