Python对基本分组语法做了扩展,增加了命名组(named group)。通过使用名字来指示组,这样以后就可以更容易地修改模式,而不必同时修改使用了匹配结果的代码。
基于40个网页-相关网页
AdminP可以更彻底地删除和重新命名组。
AdminP does a more thorough job of removing and renaming groups.
如果您喜欢用编号组而非命名组,则此函数仍然有效。
If you prefer to use numbered groups instead of named groups, this function will still work for you.
其次,更重要和强大的是命名组;与用数字指定组不同的是,它可以用名字来指定。
The second, and more significant, feature is named groups; instead of referring to them by Numbers, groups can be referenced by a name.
应用推荐