Golang Manual By AstaXie-20120522
sub := c.compile(re.Sub[0]) 139 ket := c.cap(uint32(re.Cap<<1 | 1)) 140 return c.cat(c.cat(bra, sub), ket) 141 case OpStar: 142 return c.star(c.compile(re.Sub[0]), re.Flags&NonGreedy compile(re.Sub[0]), re.Flags&NonGreedy != 0) 145 case OpQuest: 146 return c.quest(c.compile(re.Sub[0]), re.Flags&NonGreedy != 0) 147 case OpConcat: 148 if len(re.Sub) == 0 { 149 return c.nop() 150 } 151 var f frag 152 for i, sub := range re.Sub { 153 if i == 0 { 154 f = c.compile(sub) 155 } else { 1560 码力 | 6205 页 | 12.83 MB | 1 年前3Falcon v0.2.0 Documentation
Level 1 var patterns to equivalent named regex groups escaped = re.sub(r'[\.\(\)\[\]\?\*\+\^\|]', r'\\\g<0>', template) pattern = re.sub(expression_pattern, r'(?P<\1>[^/]+)', escaped) pattern = r'\A'0 码力 | 188 页 | 358.44 KB | 1 年前3Falcon v1.0.0 Documentation
Level 1 var patterns to equivalent named regex groups escaped = re.sub(r'[\.\(\)\[\]\?\*\+\^\|]', r'\\\g<0>', template) pattern = re.sub(expression_pattern, r'(?P<\1>[^/]+)', escaped) pattern = r'\A'0 码力 | 249 页 | 406.22 KB | 1 年前3Tornado 6.0 Documentation
xhtml_unescape(value: Union[str, bytes]) -> str: """Un-escapes an XML-escaped string.""" return re.sub(r"&(#?)(\w+?);", _convert_entity, _unicode(value)) # The fact that json_encode wraps json.dumps str) -> str: """Replace all sequences of whitespace chars with a single space.""" return re.sub(r"[\x00-\x20]+", " ", value).strip() [docs]def url_escape(value: Union[str, bytes], plus: bool = == "single": text = re.sub(r"([\t ]+)", " ", text) text = re.sub(r"(\s*\n\s*)", "\n", text) return text elif mode == "oneline": return re.sub(r"(\s+)", " ", text) else:0 码力 | 869 页 | 692.83 KB | 1 年前3Tornado 6.1 Documentation
xhtml_unescape(value: Union[str, bytes]) -> str: """Un-escapes an XML-escaped string.""" return re.sub(r"&(#?)(\w+?);", _convert_entity, _unicode(value)) # The fact that json_encode wraps json.dumps str) -> str: """Replace all sequences of whitespace chars with a single space.""" return re.sub(r"[\x00-\x20]+", " ", value).strip() [docs]def url_escape(value: Union[str, bytes], plus: bool = == "single": text = re.sub(r"([\t ]+)", " ", text) text = re.sub(r"(\s*\n\s*)", "\n", text) return text elif mode == "oneline": return re.sub(r"(\s+)", " ", text) else:0 码力 | 931 页 | 708.03 KB | 1 年前3KiCad PCB Editor 5.1
for draw in pcb.GetDrawings(): if draw.GetClass() == 'PTEXT': txt = re.sub("\$date\$ [0-9] {4}-[0-9]{2}-[0-9]{2}", "$date$", draw.GetText())0 码力 | 279 页 | 3.02 MB | 1 年前3Falcon v1.0.0 Documentation
Level 1 var patterns to equivalent named regex groups escaped = re.sub(r'[\.\(\)\[\]\?\*\+\^\|]', r'\\\g<0>', template) pattern = re.sub(expression_pattern, r'(?P<\1>[^/]+)', escaped) pattern = r'\A'0 码力 | 312 页 | 368.58 KB | 1 年前3KiCad PCB Editor 5.1
Run(self): pcb = pcbnew.GetBoard() for draw in pcb.GetDrawings(): if draw.GetClass() == 'PTEXT': txt = re.sub("\$date\$ [0-9]{4}-[0-9]{2}-[0-9]{2}", "$date$", draw.GetText()) if txt == "$date$": draw.SetText("$date$0 码力 | 166 页 | 3.28 MB | 1 年前3pandas: powerful Python data analysis toolkit - 0.13.1
Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1219 页 | 4.81 MB | 1 年前3pandas: powerful Python data analysis toolkit - 0.14.0
Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1349 页 | 7.67 MB | 1 年前3
共 65 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7