例如:re.sub(r'/s', lambda m: '[' + m.group(0) + ']', text, 0);将字符串中的空格' ' 替换为'[ ]'。 2、re.compile. 正则表达式可以编译成正则表达式 ...
確定! 回上一頁