-
首页
-
C4D R23.110 C++ SDK
构造函数 & 析构函数文档编制
◆
RegularExprParser()
成员函数文档编制
◆
Alloc()
Allocates a regular expression parser. Destroy the allocated regular expression parser with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated regular expression parser, or
nullptr
if the allocation failed.
◆
Free()
Destructs regular expression parsers allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
p
|
The regular expression parser to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
Init()
Initializes the parser with the regular expression
strExprssion
.
-
参数
-
[in]
|
strExprssion
|
The regular expression.
|
-
返回
-
true
if successful, otherwise
false
.
◆
FindFirst()
Performs a search using the regular expression passed to
Init()
in the string
strText
, returning the first match in
lPos
and
strPattern
.
使用
FindNext()
to access further matches.
-
参数
-
[in]
|
strText
|
The text to search.
|
[in]
|
mode
|
The search mode:
REGPARSEMODE
|
[in]
|
bOnlyFirst
|
若
true
then only one match is found, so further matches will not be returned by
FindNext()
.
|
[out]
|
lPos
|
Assigned the position of the first match.
|
[out]
|
strPattern
|
Assigned the text of the first match.
|
-
返回
-
true
if a match was found, otherwise
false
.
◆
FindNext()
Retrieves further matches after the one returned by
FindFirst()
.
-
参数
-
[out]
|
lPos
|
Assigned the position of the match.
|
[out]
|
strPattern
|
Assigned the text of the match.
|
-
返回
-
true
if another match was returned, otherwise
false
.
◆
CleanUp()
Cleans up the memory allocated by
Init()
.