C语言开源正则表达式库-----PCRE
发布时间:2020-12-14 02:27:04 所属栏目:百科 来源:网络整理
导读:#include pcre.h int pcre_exec(const pcre * code ,const pcre_extra * extra ,const char * subject ,int length ,int startoffset ,int options ,int * ovector ,int ovecsize ); DESCRIPTION This function matches a compiled regular expression again
#include <pcre.h> int pcre_exec(const pcre *code,const pcre_extra *extra,const char *subject,intlength,intstartoffset,intoptions,int *ovector,intovecsize); DESCRIPTIONThis function matches a compiled regular expression against a given subject string,using a matching algorithm that is similar to Perl's. It returns offsets to captured substrings. Its arguments are: code Points to the compiled pattern extra Points to an associated pcre[16|32]_extra structure,or is NULL subject Points to the subject string length Length of the subject string,in bytes startoffset Offset in bytes in the subject at which to start matching options Option bits ovector Points to a vector of ints for result offsets ovecsize Number of elements in the vector (a multiple of 3) 上述的API介绍为Pcre官网的介绍,大致翻译为 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |