BOOST 后向匹配 (?<=exp)(?<!pattern) 同其他类型的区别

来源:互联网 发布:macbook air适合编程吗 编辑:程序博客网 时间:2024/06/14 12:50
Lookbehind 后向匹配 
(?<=pattern) consumes zero characters, only if pattern could be matched against the characters preceding the current position (pattern must be of fixed length). 
(?<=pattern)只有当模式能够被当前位置之前的字符匹配时才成功(模式必须是固定长度),但并不消耗字符。 
指pattern 不能使用.* 等不定长的匹配,否则失败,下同
(?<!pattern) consumes zero characters, only if pattern could not be matched against the characters preceding the current position (pattern must be of fixed length). 
(?<!pattern)只有当模式不能够被当前位置之前的字符匹配时才成功(模式必须是固定长度),但并不消耗字符。 

原创粉丝点击