⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 retest.c

📁 关系型数据库 Postgresql 6.5.2
💻 C
字号:
/* * a simple regexp debug program * * $Header: /usr/local/cvsroot/pgsql/src/backend/regex/retest.c,v 1.2 1999/05/25 16:10:45 momjian Exp $ */#include <stdio.h>#include <string.h>#include "postgres.h"#include <regex/regex.h>intmain(){	int			sts;	regex_t		re;	char		buf[1024];	char	   *p;	printf("type in regexp string: ");	if (!fgets(buf, sizeof(buf), stdin))		exit(0);	p = strchr(buf, '\n');	if (p)		*p = '\0';	sts = pg95_regcomp(&re, buf, 1);	printf("regcomp: parses \"%s\" and returns %d\n", buf, sts);	for (;;)	{		printf("type in target string: ");		if (!fgets(buf, sizeof(buf), stdin))			exit(0);		p = strchr(buf, '\n');		if (p)			*p = '\0';		sts = pg95_regexec(&re, buf, 0, 0, 0);		printf("regexec: returns %d\n", sts);	}}voidelog(int lev, const char *fmt,...){}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -