1# * coding: UTF8 *
2"""
3
4该模块实现相应CPython模块的子集,如下所示。
5
6该模块实现正则表达式操作。支持的正则表达式语法是CPython re 模块的一个子集
7
8
9
10
11``.``
12   匹配任何字符
13
14``[]``
15   匹配字符集。支持单个字符和范围
16
17``^``
18   匹配开头
19
20``$``
21   匹配结尾
22
23
24函数
25------------------------------
26
27"""
28
29
30
31
32def compile(regex_str):
33   """
34   编译正则表达式,返回 正则表达式对象 对象
35
36   使用示例::
37
38      import ure
39
40      pattern = ure.compile("d")
41
42   """
43   pass
44
45def match(regex_str, string):
46   """
47   将 正则表达式 str  与 string 匹配。匹配通常从字符串的起始位置进行
48
49   使用示例::
50
51      import ure
52
53      ure.match("d","dog")
54
55   """
56   pass
57
58def  search(regex_str, string):
59   """
60   在 string 中搜索 正则表达式str 。与 match 不同,这将首先搜索与正则表达式相匹配的字符串
61
62   使用示例::
63
64      import ure
65
66      ure.search("d","abcd")
67   """
68   pass
69
70