标签: python regex
I'm testing some regex. It looks like this part is getting cut off: ing.*_{FD_YYYYMMDD}.*
ing.*_{FD_YYYYMMDD}.*
Am I doing something wrong here?
答案 0 :(得分:3)
您看到的是匹配对象的字符串表示形式。它只能用于调试,并且会被截断。
要查看某个组捕获的字符串(绿色),请致电re.search(pattern, string).group(1)
re.search(pattern, string).group(1)