Skip to content

Commit 9bb563c

Browse files
committed
Update readme.md
1 parent 333e277 commit 9bb563c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

readme.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
========================================
1010

1111
语法:
12+
13+
```
1214
^ -> 匹配开始
1315
1416
$ ->匹配结束
@@ -57,13 +59,12 @@ $ ->匹配结束
5759
(#<name>...) -> 表达式命名
5860
5961
(&<name>) -> 表达式使用(即替换成对应表达式)
60-
61-
62+
```
6263

6364
==========================================
6465

6566
API:
66-
67+
```
6768
class RegexResult:
6869
6970
@@ -93,15 +94,15 @@ FindAll(testString, beginIndex=0) -> RegexResult
9394
Replace(testString, replaceStr, replaceTime=1, beginIndex=0) -> resultString
9495
9596
ReplaceAll(testString, replaceStr, beginIndex=0) -> resultString
96-
97+
```
9798

9899

99100
============================================
100101

101102

102103

103104
examples:
104-
105+
```
105106
auto rst = Regex("^.+?@(?<type>.+?)\\.(?(com|cn))$").Match("[email protected]");
106107
107108
rst.Group().size() == 1;
@@ -115,7 +116,7 @@ rst.Group(1)[0] == "com";
115116
rst.Group("type").size() == 1;
116117
117118
rst.Group("type")[0] == "563748559";
118-
119+
```
119120

120121

121122
more examples in source/test/test.cpp

0 commit comments

Comments
 (0)