C语言的一个正则表达式pcre

2023-11-15

1. 简介

在C/C++中,一个比较好的正则表达式是pcre,被很多工具(包括一些商用工具)使用。

2. 源码下载&安装

2.1 下载

可以从官网http://www.pcre.org/下载,为方便学习,已放在这里http://download.csdn.net/detail/u013344915/7793027

2.2 Windows上的安装过程

参考:Windows上面编译pcre的步骤

2.3 Linux上面的安装过程

在Linux下面,就是执行典型的3个命令即可:

  • ./configure
  • make
  • sudo make install  //需要root权限,所以前面加了sudo

最后会安装在/usr/local/include,lib等目录中。——本文最后附上整个安装的日志。

当然,不一定要把pcre安装到/usr/local目录,可以自己编译一个lib。在pcre文档中有这方面的介绍,后面有空再补充这一块。

3. 示例

在pcre源码中,提供了一个示例代码,即pcredemo.c。但这个仍然有点复杂,所以参考这个文件,下面给出一个更简单的例子。


3.1 只匹配一次

从日期中提取出年月日:比如从"2014-08-20"中提取出年月日三个信息,即2014, 08, 20。我们用pcre来实现这个功能。


代码如下:

/*
 gcc -Wall test-pcre.c -lpcre -o testpcre
 or
 gcc -Wall test-pcre.c -I/usr/local/include -L/usr/local/lib -lpcre -o testpcre

 */

#include <stdio.h>
#include <string.h>
#include <pcre.h>

#define OVECCOUNT 30    /* should be a multiple of 3 */

int main(int argc, char **argv) {
	pcre *re;
	const char *error;
	char *pattern;
	char *date;
	int erroffset;
	int ovector[OVECCOUNT];
	int subject_length;
	int rc, i;

	pattern = "(\\d+)-(\\d+)-(\\d+)";
	date = "2014-08-20";
	subject_length = (int) strlen(date);

	/*************************************************************************
	 * Now we are going to compile the regular expression pattern, and handle *
	 * and errors that are detected.                                          *
	 *************************************************************************/

	re = pcre_compile(pattern, /* the pattern */
				0, /* default options */
				&error, /* for error message */
				&erroffset, /* for error offset */
				NULL); /* use default character tables */

	/* Compilation failed: print the error message and exit */

	if (re == NULL) {
		printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
		return 1;
	}

	/*************************************************************************
	 * If the compilation succeeded, we call PCRE again, in order to do a     *
	 * pattern match against the subject string. This does just ONE match. If *
	 * further matching is needed, it will be done below.                     *
	 *************************************************************************/

	rc = pcre_exec(re, /* the compiled pattern */
				NULL, /* no extra data - we didn't study the pattern */
				date, /* the subject string */
				subject_length, /* the length of the subject */
				0, /* start at offset 0 in the subject */
				0, /* default options */
				ovector, /* output vector for substring information */
				OVECCOUNT); /* number of elements in the output vector */

	/* Matching failed: handle error cases */

	if (rc < 0) {
		switch (rc) {
		case PCRE_ERROR_NOMATCH:
			printf("No match\n");
			break;
			/*
			 Handle other special cases if you like
			 */
		default:
			printf("Matching error %d\n", rc);
			break;
		}
		pcre_free(re); /* Release memory used for the compiled pattern */
		return 1;
	}

	/* Match succeded */

	printf("\nMatch succeeded at offset %d\n", ovector[0]);

	/*************************************************************************
	 * We have found the first match within the subject string. If the output *
	 * vector wasn't big enough, say so. Then output any substrings that were *
	 * captured.                                                              *
	 *************************************************************************/

	/* The output vector wasn't big enough */

	if (rc == 0) {
		rc = OVECCOUNT / 3;
		printf("ovector only has room for %d captured substrings\n", rc - 1);
	}

	/* Show substrings stored in the output vector by number. Obviously, in a real
	 application you might want to do things other than print them. */

	for (i = 0; i < rc; i++) {
		char *substring_start = date + ovector[2 * i];
		int substring_length = ovector[2 * i + 1] - ovector[2 * i];
		printf("%2d: %.*s\n", i, substring_length, substring_start);
	}

	printf("\n");
	pcre_free(re); /* Release memory used for the compiled pattern */
	return 0;
}

运行结果:

flying-bird@flyingbird:~/workspace/StudentExample/src$ gcc -Wall test-pcre.c -lpcre -o testpcre
flying-bird@flyingbird:~/workspace/StudentExample/src$ ./testpcre 
./testpcre: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
flying-bird@flyingbird:~/workspace/StudentExample/src$ ll /usr/local/lib/libpcre.so.1
lrwxrwxrwx 1 root root 16  8月 20 20:33 /usr/local/lib/libpcre.so.1 -> libpcre.so.1.2.3*
flying-bird@flyingbird:~/workspace/StudentExample/src$ sudo ldconfig
[sudo] password for flying-bird: 
flying-bird@flyingbird:~/workspace/StudentExample/src$ ./testpcre 

Match succeeded at offset 0
 0: 2014-08-20
 1: 2014
 2: 08
 3: 20

flying-bird@flyingbird:~/workspace/StudentExample/src$ 


3.2 多次匹配

上面的例子是一次匹配,且一次匹配了多个子串。这里换一种匹配方式,即多次匹配。这要用到pcre_exec的start_offset参数,指定从指定的字符串的哪个位置开始匹配。


为此,现在把匹配串做一点修改,不再匹配年月日,而是匹配连续的数字串。因此,希望匹配出年,然后匹配出月,以及日。通过上面的例子,一次pcre_exec()只能匹配出一个串,所以要修改代码,有如下几点:

  • 增加一个 int subject_offset,说明从字符串的哪个位置开始匹配;
  • 加了一个for循环,持续地匹配,直到找不到匹配的串为止;
  • for循环内部,每次匹配到之后,就调整subject_offset。

// testpcre.cpp : Defines the entry point for the console application.
//

/*
 gcc -Wall test-pcre.c -lpcre -o testpcre
 or
 gcc -Wall test-pcre.c -I/usr/local/include -L/usr/local/lib -lpcre -o testpcre

 */

#include <stdio.h>
#include <string.h>
#include "pcre.h"

//#define PCRE_STATIC

#define OVECCOUNT 30    /* should be a multiple of 3 */

int main(int argc, char **argv) {
	pcre *re;
	const char *error;
	char *pattern;
	char *date;
	int erroffset;
	int ovector[OVECCOUNT];
	int subject_length;
	int rc, i;
	int subject_offset = 0;

	pattern = "(\\d+)";
	date = "2014-08-20";
	subject_length = (int) strlen(date);

	/*************************************************************************
	 * Now we are going to compile the regular expression pattern, and handle *
	 * and errors that are detected.                                          *
	 *************************************************************************/

	re = pcre_compile(pattern, /* the pattern */
				0, /* default options */
				&error, /* for error message */
				&erroffset, /* for error offset */
				NULL); /* use default character tables */

	/* Compilation failed: print the error message and exit */

	if (re == NULL) {
		printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
		return 1;
	}

	/*************************************************************************
	 * If the compilation succeeded, we call PCRE again, in order to do a     *
	 * pattern match against the subject string. This does just ONE match. If *
	 * further matching is needed, it will be done below.                     *
	 *************************************************************************/
	
	for (;;) {
		rc = pcre_exec(re, /* the compiled pattern */
					NULL, /* no extra data - we didn't study the pattern */
					date, /* the subject string */
					subject_length, /* the length of the subject */
					subject_offset, /* start at offset 0 in the subject */
					0, /* default options */
					ovector, /* output vector for substring information */
					OVECCOUNT); /* number of elements in the output vector */

		/* Matching failed: handle error cases */

		if (rc < 0) {
			switch (rc) {
			case PCRE_ERROR_NOMATCH:
				printf("No match\n");
				break;
				/*
				 Handle other special cases if you like
				 */
			default:
				printf("Matching error %d\n", rc);
				break;
			}
			pcre_free(re); /* Release memory used for the compiled pattern */
			return 1;
		}

		/* Match succeded */

		printf("\nMatch succeeded at offset %d\n", ovector[0]);

		/*************************************************************************
		 * We have found the first match within the subject string. If the output *
		 * vector wasn't big enough, say so. Then output any substrings that were *
		 * captured.                                                              *
		 *************************************************************************/

		/* The output vector wasn't big enough */

		if (rc == 0) {
			rc = OVECCOUNT / 3;
			printf("ovector only has room for %d captured substrings\n", rc - 1);
		}

		/* Show substrings stored in the output vector by number. Obviously, in a real
		 application you might want to do things other than print them. */

		for (i = 0; i < rc; i++) {
			char *substring_start = date + ovector[2 * i];
			int substring_length = ovector[2 * i + 1] - ovector[2 * i];
			printf("%2d: %.*s\n", i, substring_length, substring_start);
		}

		printf("\n");

		subject_offset = ovector[1];
	}

	pcre_free(re); /* Release memory used for the compiled pattern */
	return 0;
}



4. Ubuntu安装日志

flying-bird@flyingbird:~/software/pcre-8.35$ ll ./configure
-rwxr-xr-x 1 flying-bird flying-bird 677106  4月  4 14:39 ./configure*
flying-bird@flyingbird:~/software/pcre-8.35$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for int64_t... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether ln -s works... yes
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking for ANSI C header files... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for alias support in the linker... no
checking for alias support in the linker... no
checking string usability... yes
checking string presence... yes
checking for string... yes
checking bits/type_traits.h usability... no
checking bits/type_traits.h presence... no
checking for bits/type_traits.h... no
checking type_traits.h usability... no
checking type_traits.h presence... no
checking for type_traits.h... no
checking for strtoq... yes
checking for long long... yes
checking for unsigned long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for bcopy... yes
checking for memmove... yes
checking for strerror... yes
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
checking for gzopen in -lz... no
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking for libbz2... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libpcre.pc
config.status: creating libpcre16.pc
config.status: creating libpcre32.pc
config.status: creating libpcreposix.pc
config.status: creating libpcrecpp.pc
config.status: creating pcre-config
config.status: creating pcre.h
config.status: creating pcre_stringpiece.h
config.status: creating pcrecpparg.h
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing script-chmod commands
config.status: executing delete-old-chartables commands

pcre-8.35 configuration summary:

    Install prefix .................. : /usr/local
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/bin/ld
    C preprocessor flags ............ : 
    C compiler flags ................ : -g -O2 -fvisibility=hidden
    C++ compiler flags .............. : -O2 -fvisibility=hidden -fvisibility-inlines-hidden
    Linker flags .................... : 
    Extra libraries ................. : 

    Build 8 bit pcre library ........ : yes
    Build 16 bit pcre library ....... : no
    Build 32 bit pcre library ....... : no
    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8/16/32 support ...... : no
    Unicode properties .............. : no
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    EBCDIC code for NL .............. : n/a
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Nested parentheses limit ........ : 250
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libedit ...... : no
    Link pcretest with libreadline .. : no
    Valgrind support ................ : no
    Code coverage ................... : no

flying-bird@flyingbird:~/software/pcre-8.35$ make
rm -f pcre_chartables.c
ln -s ./pcre_chartables.c.dist pcre_chartables.c
make  all-am
make[1]: Entering directory `/home/flying-bird/software/pcre-8.35'
  CC       libpcre_la-pcre_byte_order.lo
  CC       libpcre_la-pcre_compile.lo
  CC       libpcre_la-pcre_config.lo
  CC       libpcre_la-pcre_dfa_exec.lo
  CC       libpcre_la-pcre_exec.lo
  CC       libpcre_la-pcre_fullinfo.lo
  CC       libpcre_la-pcre_get.lo
  CC       libpcre_la-pcre_globals.lo
  CC       libpcre_la-pcre_jit_compile.lo
  CC       libpcre_la-pcre_maketables.lo
  CC       libpcre_la-pcre_newline.lo
  CC       libpcre_la-pcre_ord2utf8.lo
  CC       libpcre_la-pcre_refcount.lo
  CC       libpcre_la-pcre_string_utils.lo
  CC       libpcre_la-pcre_study.lo
  CC       libpcre_la-pcre_tables.lo
  CC       libpcre_la-pcre_ucd.lo
  CC       libpcre_la-pcre_valid_utf8.lo
  CC       libpcre_la-pcre_version.lo
  CC       libpcre_la-pcre_xclass.lo
  CC       libpcre_la-pcre_chartables.lo
  CCLD     libpcre.la
  CC       libpcreposix_la-pcreposix.lo
  CCLD     libpcreposix.la
  CXX      libpcrecpp_la-pcrecpp.lo
  CXX      libpcrecpp_la-pcre_scanner.lo
  CXX      libpcrecpp_la-pcre_stringpiece.lo
  CXXLD    libpcrecpp.la
  CC       pcretest-pcretest.o
  CC       pcretest-pcre_printint.o
  CCLD     pcretest
  CC       pcregrep-pcregrep.o
  CCLD     pcregrep
  CXX      pcrecpp_unittest-pcrecpp_unittest.o
  CXXLD    pcrecpp_unittest
  CXX      pcre_scanner_unittest-pcre_scanner_unittest.o
  CXXLD    pcre_scanner_unittest
  CXX      pcre_stringpiece_unittest-pcre_stringpiece_unittest.o
  CXXLD    pcre_stringpiece_unittest
make[1]: Leaving directory `/home/flying-bird/software/pcre-8.35'
flying-bird@flyingbird:~/software/pcre-8.35$ sudo make install
[sudo] password for flying-bird: 
make  install-am
make[1]: Entering directory `/home/flying-bird/software/pcre-8.35'
make[2]: Entering directory `/home/flying-bird/software/pcre-8.35'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libpcre.la libpcreposix.la libpcrecpp.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libpcre.so.1.2.3 /usr/local/lib/libpcre.so.1.2.3
libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.3 libpcre.so.1 || { rm -f libpcre.so.1 && ln -s libpcre.so.1.2.3 libpcre.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.3 libpcre.so || { rm -f libpcre.so && ln -s libpcre.so.1.2.3 libpcre.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcre.lai /usr/local/lib/libpcre.la
libtool: install: warning: relinking `libpcreposix.la'
libtool: install: (cd /home/flying-bird/software/pcre-8.35; /bin/bash /home/flying-bird/software/pcre-8.35/libtool  --silent --tag CC --mode=relink gcc -fvisibility=hidden -g -O2 -version-info 0:2:0 -o libpcreposix.la -rpath /usr/local/lib libpcreposix_la-pcreposix.lo libpcre.la )
libtool: install: /usr/bin/install -c .libs/libpcreposix.so.0.0.2T /usr/local/lib/libpcreposix.so.0.0.2
libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.2 libpcreposix.so.0 || { rm -f libpcreposix.so.0 && ln -s libpcreposix.so.0.0.2 libpcreposix.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.2 libpcreposix.so || { rm -f libpcreposix.so && ln -s libpcreposix.so.0.0.2 libpcreposix.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcreposix.lai /usr/local/lib/libpcreposix.la
libtool: install: warning: relinking `libpcrecpp.la'
libtool: install: (cd /home/flying-bird/software/pcre-8.35; /bin/bash /home/flying-bird/software/pcre-8.35/libtool  --silent --tag CXX --mode=relink g++ -fvisibility=hidden -fvisibility-inlines-hidden -O2 -version-info 0:0:0 -o libpcrecpp.la -rpath /usr/local/lib libpcrecpp_la-pcrecpp.lo libpcrecpp_la-pcre_scanner.lo libpcrecpp_la-pcre_stringpiece.lo libpcre.la )
libtool: install: /usr/bin/install -c .libs/libpcrecpp.so.0.0.0T /usr/local/lib/libpcrecpp.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libpcrecpp.so.0.0.0 libpcrecpp.so.0 || { rm -f libpcrecpp.so.0 && ln -s libpcrecpp.so.0.0.0 libpcrecpp.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcrecpp.so.0.0.0 libpcrecpp.so || { rm -f libpcrecpp.so && ln -s libpcrecpp.so.0.0.0 libpcrecpp.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcrecpp.lai /usr/local/lib/libpcrecpp.la
libtool: install: /usr/bin/install -c .libs/libpcre.a /usr/local/lib/libpcre.a
libtool: install: chmod 644 /usr/local/lib/libpcre.a
libtool: install: ranlib /usr/local/lib/libpcre.a
libtool: install: /usr/bin/install -c .libs/libpcreposix.a /usr/local/lib/libpcreposix.a
libtool: install: chmod 644 /usr/local/lib/libpcreposix.a
libtool: install: ranlib /usr/local/lib/libpcreposix.a
libtool: install: /usr/bin/install -c .libs/libpcrecpp.a /usr/local/lib/libpcrecpp.a
libtool: install: chmod 644 /usr/local/lib/libpcrecpp.a
libtool: install: ranlib /usr/local/lib/libpcrecpp.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c pcretest pcregrep '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/pcretest /usr/local/bin/pcretest
libtool: install: /usr/bin/install -c .libs/pcregrep /usr/local/bin/pcregrep
 /bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c pcre-config '/usr/local/bin'
 /bin/mkdir -p '/usr/local/share/doc/pcre'
 /usr/bin/install -c -m 644 doc/pcre.txt doc/pcre-config.txt doc/pcregrep.txt doc/pcretest.txt AUTHORS COPYING ChangeLog LICENCE NEWS README '/usr/local/share/doc/pcre'
 /bin/mkdir -p '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/NON-AUTOTOOLS-BUILD.txt doc/html/README.txt doc/html/index.html doc/html/pcre-config.html doc/html/pcre.html doc/html/pcre16.html doc/html/pcre32.html doc/html/pcre_assign_jit_stack.html doc/html/pcre_compile.html doc/html/pcre_compile2.html doc/html/pcre_config.html doc/html/pcre_copy_named_substring.html doc/html/pcre_copy_substring.html doc/html/pcre_dfa_exec.html doc/html/pcre_exec.html doc/html/pcre_free_study.html doc/html/pcre_free_substring.html doc/html/pcre_free_substring_list.html doc/html/pcre_fullinfo.html doc/html/pcre_get_named_substring.html doc/html/pcre_get_stringnumber.html doc/html/pcre_get_stringtable_entries.html doc/html/pcre_get_substring.html doc/html/pcre_get_substring_list.html doc/html/pcre_jit_exec.html doc/html/pcre_jit_stack_alloc.html doc/html/pcre_jit_stack_free.html doc/html/pcre_maketables.html doc/html/pcre_pattern_to_host_byte_order.html doc/html/pcre_refcount.html doc/html/pcre_study.html doc/html/pcre_utf16_to_host_byte_order.html doc/html/pcre_utf32_to_host_byte_order.html doc/html/pcre_version.html doc/html/pcreapi.html doc/html/pcrebuild.html doc/html/pcrecallout.html doc/html/pcrecompat.html doc/html/pcredemo.html doc/html/pcregrep.html '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/pcrejit.html doc/html/pcrelimits.html doc/html/pcrematching.html doc/html/pcrepartial.html doc/html/pcrepattern.html doc/html/pcreperform.html doc/html/pcreposix.html doc/html/pcreprecompile.html doc/html/pcresample.html doc/html/pcrestack.html doc/html/pcresyntax.html doc/html/pcretest.html doc/html/pcreunicode.html '/usr/local/share/doc/pcre/html'
 /bin/mkdir -p '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/pcrecpp.html '/usr/local/share/doc/pcre/html'
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 pcreposix.h pcrecpp.h pcre_scanner.h '/usr/local/include'
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 doc/pcre-config.1 doc/pcregrep.1 doc/pcretest.1 '/usr/local/share/man/man1'
 /bin/mkdir -p '/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 doc/pcre.3 doc/pcre16.3 doc/pcre32.3 doc/pcre_assign_jit_stack.3 doc/pcre_compile.3 doc/pcre_compile2.3 doc/pcre_config.3 doc/pcre_copy_named_substring.3 doc/pcre_copy_substring.3 doc/pcre_dfa_exec.3 doc/pcre_exec.3 doc/pcre_free_study.3 doc/pcre_free_substring.3 doc/pcre_free_substring_list.3 doc/pcre_fullinfo.3 doc/pcre_get_named_substring.3 doc/pcre_get_stringnumber.3 doc/pcre_get_stringtable_entries.3 doc/pcre_get_substring.3 doc/pcre_get_substring_list.3 doc/pcre_jit_exec.3 doc/pcre_jit_stack_alloc.3 doc/pcre_jit_stack_free.3 doc/pcre_maketables.3 doc/pcre_pattern_to_host_byte_order.3 doc/pcre_refcount.3 doc/pcre_study.3 doc/pcre_utf16_to_host_byte_order.3 doc/pcre_utf32_to_host_byte_order.3 doc/pcre_version.3 doc/pcreapi.3 doc/pcrebuild.3 doc/pcrecallout.3 doc/pcrecompat.3 doc/pcredemo.3 doc/pcrejit.3 doc/pcrelimits.3 doc/pcrematching.3 doc/pcrepartial.3 doc/pcrepattern.3 '/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 doc/pcreperform.3 doc/pcreposix.3 doc/pcreprecompile.3 doc/pcresample.3 doc/pcrestack.3 doc/pcresyntax.3 doc/pcreunicode.3 doc/pcrecpp.3 '/usr/local/share/man/man3'
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 pcre.h pcrecpparg.h pcre_stringpiece.h '/usr/local/include'
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libpcre.pc libpcreposix.pc libpcrecpp.pc '/usr/local/lib/pkgconfig'
make  install-data-hook
make[3]: Entering directory `/home/flying-bird/software/pcre-8.35'
ln -sf pcre_assign_jit_stack.3		 /usr/local/share/man/man3/pcre16_assign_jit_stack.3
ln -sf pcre_compile.3			 /usr/local/share/man/man3/pcre16_compile.3
ln -sf pcre_compile2.3			 /usr/local/share/man/man3/pcre16_compile2.3
ln -sf pcre_config.3			 /usr/local/share/man/man3/pcre16_config.3
ln -sf pcre_copy_named_substring.3	 /usr/local/share/man/man3/pcre16_copy_named_substring.3
ln -sf pcre_copy_substring.3		 /usr/local/share/man/man3/pcre16_copy_substring.3
ln -sf pcre_dfa_exec.3			 /usr/local/share/man/man3/pcre16_dfa_exec.3
ln -sf pcre_exec.3			 /usr/local/share/man/man3/pcre16_exec.3
ln -sf pcre_free_study.3		 /usr/local/share/man/man3/pcre16_free_study.3
ln -sf pcre_free_substring.3		 /usr/local/share/man/man3/pcre16_free_substring.3
ln -sf pcre_free_substring_list.3	 /usr/local/share/man/man3/pcre16_free_substring_list.3
ln -sf pcre_fullinfo.3			 /usr/local/share/man/man3/pcre16_fullinfo.3
ln -sf pcre_get_named_substring.3	 /usr/local/share/man/man3/pcre16_get_named_substring.3
ln -sf pcre_get_stringnumber.3		 /usr/local/share/man/man3/pcre16_get_stringnumber.3
ln -sf pcre_get_stringtable_entries.3	 /usr/local/share/man/man3/pcre16_get_stringtable_entries.3
ln -sf pcre_get_substring.3		 /usr/local/share/man/man3/pcre16_get_substring.3
ln -sf pcre_get_substring_list.3	 /usr/local/share/man/man3/pcre16_get_substring_list.3
ln -sf pcre_jit_exec.3			 /usr/local/share/man/man3/pcre16_jit_exec.3
ln -sf pcre_jit_stack_alloc.3		 /usr/local/share/man/man3/pcre16_jit_stack_alloc.3
ln -sf pcre_jit_stack_free.3		 /usr/local/share/man/man3/pcre16_jit_stack_free.3
ln -sf pcre_maketables.3		 /usr/local/share/man/man3/pcre16_maketables.3
ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre16_pattern_to_host_byte_order.3
ln -sf pcre_refcount.3			 /usr/local/share/man/man3/pcre16_refcount.3
ln -sf pcre_study.3			 /usr/local/share/man/man3/pcre16_study.3
ln -sf pcre_utf16_to_host_byte_order.3	 /usr/local/share/man/man3/pcre16_utf16_to_host_byte_order.3
ln -sf pcre_version.3			 /usr/local/share/man/man3/pcre16_version.3
ln -sf pcre_assign_jit_stack.3		 /usr/local/share/man/man3/pcre32_assign_jit_stack.3
ln -sf pcre_compile.3			 /usr/local/share/man/man3/pcre32_compile.3
ln -sf pcre_compile2.3			 /usr/local/share/man/man3/pcre32_compile2.3
ln -sf pcre_config.3			 /usr/local/share/man/man3/pcre32_config.3
ln -sf pcre_copy_named_substring.3	 /usr/local/share/man/man3/pcre32_copy_named_substring.3
ln -sf pcre_copy_substring.3		 /usr/local/share/man/man3/pcre32_copy_substring.3
ln -sf pcre_dfa_exec.3			 /usr/local/share/man/man3/pcre32_dfa_exec.3
ln -sf pcre_exec.3			 /usr/local/share/man/man3/pcre32_exec.3
ln -sf pcre_free_study.3		 /usr/local/share/man/man3/pcre32_free_study.3
ln -sf pcre_free_substring.3		 /usr/local/share/man/man3/pcre32_free_substring.3
ln -sf pcre_free_substring_list.3	 /usr/local/share/man/man3/pcre32_free_substring_list.3
ln -sf pcre_fullinfo.3			 /usr/local/share/man/man3/pcre32_fullinfo.3
ln -sf pcre_get_named_substring.3	 /usr/local/share/man/man3/pcre32_get_named_substring.3
ln -sf pcre_get_stringnumber.3		 /usr/local/share/man/man3/pcre32_get_stringnumber.3
ln -sf pcre_get_stringtable_entries.3	 /usr/local/share/man/man3/pcre32_get_stringtable_entries.3
ln -sf pcre_get_substring.3		 /usr/local/share/man/man3/pcre32_get_substring.3
ln -sf pcre_get_substring_list.3	 /usr/local/share/man/man3/pcre32_get_substring_list.3
ln -sf pcre_jit_exec.3			 /usr/local/share/man/man3/pcre32_jit_exec.3
ln -sf pcre_jit_stack_alloc.3		 /usr/local/share/man/man3/pcre32_jit_stack_alloc.3
ln -sf pcre_jit_stack_free.3		 /usr/local/share/man/man3/pcre32_jit_stack_free.3
ln -sf pcre_maketables.3		 /usr/local/share/man/man3/pcre32_maketables.3
ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre32_pattern_to_host_byte_order.3
ln -sf pcre_refcount.3			 /usr/local/share/man/man3/pcre32_refcount.3
ln -sf pcre_study.3			 /usr/local/share/man/man3/pcre32_study.3
ln -sf pcre_utf32_to_host_byte_order.3	 /usr/local/share/man/man3/pcre32_utf32_to_host_byte_order.3
ln -sf pcre_version.3			 /usr/local/share/man/man3/pcre32_version.3
make[3]: Leaving directory `/home/flying-bird/software/pcre-8.35'
make[2]: Leaving directory `/home/flying-bird/software/pcre-8.35'
make[1]: Leaving directory `/home/flying-bird/software/pcre-8.35'
flying-bird@flyingbird:~/software/pcre-8.35$ 
flying-bird@flyingbird:~/software/pcre-8.35$ 
flying-bird@flyingbird:~/software/pcre-8.35$ cd /usr/local/include/
flying-bird@flyingbird:/usr/local/include$ ll
total 100
drwxr-xr-x  2 root root  4096  8月 20 20:33 ./
drwxr-xr-x 10 root root  4096  4月 24  2012 ../
-rw-r--r--  1 root root  6783  8月 20 20:33 pcrecpparg.h
-rw-r--r--  1 root root 26529  8月 20 20:33 pcrecpp.h
-rw-r--r--  1 root root 31706  8月 20 20:33 pcre.h
-rw-r--r--  1 root root  5452  8月 20 20:33 pcreposix.h
-rw-r--r--  1 root root  6600  8月 20 20:33 pcre_scanner.h
-rw-r--r--  1 root root  6253  8月 20 20:33 pcre_stringpiece.h
flying-bird@flyingbird:/usr/local/include$ cd ../lib
flying-bird@flyingbird:/usr/local/lib$ ll
total 1016
drwxr-xr-x  5 root root    4096  8月 20 20:33 ./
drwxr-xr-x 10 root root    4096  4月 24  2012 ../
-rw-r--r--  1 root root  515794  8月 20 20:33 libpcre.a
-rw-r--r--  1 root root   38886  8月 20 20:33 libpcrecpp.a
-rwxr-xr-x  1 root root     964  8月 20 20:33 libpcrecpp.la*
lrwxrwxrwx  1 root root      19  8月 20 20:33 libpcrecpp.so -> libpcrecpp.so.0.0.0*
lrwxrwxrwx  1 root root      19  8月 20 20:33 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0*
-rwxr-xr-x  1 root root   44062  8月 20 20:33 libpcrecpp.so.0.0.0*
-rwxr-xr-x  1 root root     917  8月 20 20:33 libpcre.la*
-rw-r--r--  1 root root   16064  8月 20 20:33 libpcreposix.a
-rwxr-xr-x  1 root root     978  8月 20 20:33 libpcreposix.la*
lrwxrwxrwx  1 root root      21  8月 20 20:33 libpcreposix.so -> libpcreposix.so.0.0.2*
lrwxrwxrwx  1 root root      21  8月 20 20:33 libpcreposix.so.0 -> libpcreposix.so.0.0.2*
-rwxr-xr-x  1 root root   20461  8月 20 20:33 libpcreposix.so.0.0.2*
lrwxrwxrwx  1 root root      16  8月 20 20:33 libpcre.so -> libpcre.so.1.2.3*
lrwxrwxrwx  1 root root      16  8月 20 20:33 libpcre.so.1 -> libpcre.so.1.2.3*
-rwxr-xr-x  1 root root  366755  8月 20 20:33 libpcre.so.1.2.3*
drwxr-xr-x  2 root root    4096  8月 20 20:33 pkgconfig/
drwxrwsr-x  4 root staff   4096  8月 13 22:19 python2.7/
drwxrwsr-x  3 root staff   4096  8月 13 22:19 python3.4/
flying-bird@flyingbird:/usr/local/lib$ cd ../bin
flying-bird@flyingbird:/usr/local/bin$ ll
total 284
drwxr-xr-x  2 root root   4096  8月 20 20:33 ./
drwxr-xr-x 10 root root   4096  4月 24  2012 ../
-rwxr-xr-x  1 root root   2363  8月 20 20:33 pcre-config*
-rwxr-xr-x  1 root root  89152  8月 20 20:33 pcregrep*
-rwxr-xr-x  1 root root 186890  8月 20 20:33 pcretest*
flying-bird@flyingbird:/usr/local/bin$ cd ../share/
ca-certificates/ doc/             fonts/           man/             sgml/            xml/             
flying-bird@flyingbird:/usr/local/bin$ cd ../share/doc/
flying-bird@flyingbird:/usr/local/share/doc$ ll
total 12
drwxr-xr-x 3 root root 4096  8月 20 20:33 ./
drwxr-xr-x 8 root root 4096  8月 20 20:33 ../
drwxr-xr-x 3 root root 4096  8月 20 20:33 pcre/
flying-bird@flyingbird:/usr/local/share/doc$ cd pcre/
flying-bird@flyingbird:/usr/local/share/doc/pcre$ ll
total 956
drwxr-xr-x 3 root root   4096  8月 20 20:33 ./
drwxr-xr-x 3 root root   4096  8月 20 20:33 ../
-rw-r--r-- 1 root root    851  8月 20 20:33 AUTHORS
-rw-r--r-- 1 root root 264114  8月 20 20:33 ChangeLog
-rw-r--r-- 1 root root     95  8月 20 20:33 COPYING
drwxr-xr-x 2 root root   4096  8月 20 20:33 html/
-rw-r--r-- 1 root root   3099  8月 20 20:33 LICENCE
-rw-r--r-- 1 root root  27924  8月 20 20:33 NEWS
-rw-r--r-- 1 root root   3146  8月 20 20:33 pcre-config.txt
-rw-r--r-- 1 root root  42257  8月 20 20:33 pcregrep.txt
-rw-r--r-- 1 root root  54244  8月 20 20:33 pcretest.txt
-rw-r--r-- 1 root root 504077  8月 20 20:33 pcre.txt
-rw-r--r-- 1 root root  44896  8月 20 20:33 README
flying-bird@flyingbird:/usr/local/share/doc/pcre$ 

4. 正则表达式资料

在之前的python系列(此系列未完待续)中,有一篇介绍了正则表达式:Python入门教程-12 正则表达式 ,其中推荐了学习正则表达式的书籍。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

C语言的一个正则表达式pcre 的相关文章

  • linux ARM64 处理器内存屏障

    一 内存类型 ARMv8架构将系统中所有的内存 按照它们的特性 划分成两种 即普通内存和设备内存 并且它们是互斥的 也就是说系统中的某段内存要么是普通内存 要么是设备内存 不能都是 1 普通内存 Normal Memory 普通内存的特性是
  • C++常见STL容器基本用法

    1 vector include
  • php 正则表达式 utf-8 中的单词边界匹配

    我在 utf 8 php 文件中有以下 php 代码 var dump setlocale LC CTYPE de DE utf8 German Germany utf 8 de DE german var dump mb internal
  • BMS开发之面向对象思想(adbms1818)

    借鉴adbms1818的底层驱动代码 前言 adbms1818的主要用途就是不同种类的寄存器里面存储不同的数据 程序员需要通过特定的协议往寄存器里面写入或者读出数据 1 定义一个结构体 里面存储了adbms1818的所有寄存器的信息 然后我
  • Freertos低功耗管理

    空闲任务中的低功耗Tickless处理 在整个系统运行得过程中 其中大部分时间都是在执行空闲任务的 空闲任务之所以执行 因为在系统中的其他任务处于阻塞或者被挂起时才会执行 因此可以将空闲任务的执行时间转换成低功耗模式 在其他任务解除阻塞而准
  • CCF模拟题 202309-2 坐标变换(其二)

    问题描述 试题编号 202309 2 试题名称 坐标变换 其二 时间限制 1 0s 内存限制 512 0MB 问题描述 对于平面直角坐标系上的坐标 x y 小 P 定义了如下两种操作 1 拉伸 k 倍 横坐标 x 变为 kx 纵坐标 y 变
  • /lib64/libstdc++.so.6库缺失

    问题 lib64 libstdc so 6 version CXXABI 1 3 8 not found lib64 libstdc so 6 version CXXABI 1 3 9 not found lib64 libstdc so
  • C 语言文件读取全指南:打开、读取、逐行输出

    C 语言中的文件读取 要从文件读取 可以使用 r 模式 FILE fptr 以读取模式打开文件 fptr fopen filename txt r 这将使 filename txt 打开以进行读取 在 C 中读取文件需要一点工作 坚持住 我
  • C和指针课后答案

    提示 文章写完后 目录可以自动生成 如何生成可参考右边的帮助文档 文章目录 前言 一 pandas是什么 二 使用步骤 1 引入库 2 读入数据 总结 前言 第八章课后答案 提示 以下是本篇文章正文内容 下面案例可供参考
  • 带头双向循环链表基础

    带头双向循环链表基础 销毁 销毁 void ListDestory ListNode phead void ListDestory ListNode phead assert phead ListNode cur phead gt next
  • PCRE正则表达式非连续重复

    我尝试最少 6 个字符 总共最多 15 个字符 第一个必须是字母数字 无特殊 接下来 最多 13 个字符必须是字母数字 并且可以包含不连续 一次只能包含以下一项 下划线或句点或连字符 最后一个字符必须是字母数字 好的示例 A 3 hj 3J
  • 用于匹配多种类型编号列表的正则表达式

    我想创建一个 PCRE 正则表达式来匹配所有常用的编号列表 并且我想分享我的想法并收集有关执行此操作的方法的输入 我将 列表 定义为一组规范的盎格鲁撒克逊约定 即 Numbers 1 2 3 1 2 3 1 2 3 1 2 3 1 1 1
  • PCRE pcre_exec 线程安全吗?

    我有一个 C 程序 它使用 PCRE 正则表达式来确定 cgroup 中的进程是否应添加到一个变量或另一个变量 我生成一个线程来读取每个正在运行的 cgroup 中的 cpuacct stat 文件 其中线程数从未超过核心数 然后将这些样本
  • 与 preg_match_all 匹配

    我得到这个正则表达式 val 123 4 56 regex preg match all regex val matches 谁能告诉我为什么这只匹配最后一个数字 56 而不是每组数字 这是上面的正则表达式运行后 matches 包含的内容
  • 仅用一个正则表达式进行多次替换

    为了简单起见 假设我们有以下字符串 约翰爱玛丽 玛丽爱杰克 而杰克不关心约翰和玛丽 假设我想使用正则表达式来更改该故事的角色 约翰 gt 约瑟夫 玛丽 gt 杰西卡 杰克 gt 基思 当然 我可以一次更改其中一项 但我想知道是否可以仅用一个
  • 为什么 [\n$] 不起作用,而 (\n|$) 起作用?

    我们有这个字符串 末尾没有换行 The quick brown fox jumps over the lazy dog 我想匹配整个字符串直到新行 n or end occurs 我首先尝试 n 没用 然后我尝试了 n 做了工作 问题 为什
  • nginx 位置正则表达式 - 字符类和匹配范围

    我正在尝试为路径设置正则表达式 s lt 4 6 character string here gt 我将 4 6 个字符串捕获为 1 我尝试使用以下两个条目 但都失败了 location s 0 9a zA Z 4 6 location s
  • 判断正则表达式是否只匹配固定长度的字符串

    有没有办法确定正则表达式是否只匹配固定长度的字符串 我的想法是扫描 和 然后 需要一些智能逻辑来查找 m n 其中 m n 没有必要采取 考虑到运营商 小例子 d 4 是固定长度 d 4 5 或 d 是可变长度 我正在使用PCRE Than
  • 为什么 PCRE 正则表达式比 C++11 正则表达式快得多

    一些示例代码 这是使用 cregex iterator 的 c 11 部分 std chrono steady clock time point begin0 std chrono steady clock now regex re
  • Woocommerce:添加第二个电子邮件地址不起作用,除非收件人是管理员

    我尝试了多种方法来向 Woocommerce 电子邮件添加其他收件人 但它似乎仅适用于主要收件人是管理员的测试订单 这些是我尝试过的片段 如果订单的客户是管理员 则电子邮件将发送到这两个地址 如果订单包含客户电子邮件地址 则仅发送至该电子邮

随机推荐

  • 有效解决C# Random生成随机数重复的问题

    在Random生成随机数的时候 如果短时间内连续生成随机数 就会导致生成的随机数相同 下面我们介绍如何解决在 短时间内生成随机数的时候 如何避免随机数不一样的问题 实例下载链接 http download csdn net download
  • FPGA——浅谈跨时钟域

    本篇文章仅用于个人学习 如有雷同 我抄他的 跨时钟域是每个FPGA初学者都会遇到的问题 跨时钟域分情况有以下几种 单bit跨时钟域 慢时钟域到快时钟域 快时钟域到慢时钟域 多bit跨时钟域 单bit跨时钟域 慢时钟域到快时钟域 首先谈谈单b
  • 华为OD机试真题 Java 实现【快速开租建站】【2023Q1 200分】,附详细解题思路

    一 题目描述 当前IT部门支撑了子公司颗粒化业务 该部门需要实现为子公司快速开租建站的能力 建站是指在一个全新的环境部署一套IT服务 每个站点开站会由一系列部署任务项构成 每个任务项部署完成时间都是固定和相等的 设为1 部署任务项之间可能存
  • Java正则表达式工具类

    import org apache commons lang3 StringUtils import org slf4j Logger import org slf4j LoggerFactory import java lang refl
  • Altium designer20(AD20)安装教程

    一 教程是基于本人在安装过程中的截图 步骤都非常详细 PDF教程文档 AD 20安装 提取码 u8mm AD20下载链接 AD20安装包 提取码 v7t6
  • KDD Cup竞赛介绍

    转自 http huzhyi21 blog 163 com blog static 1007396200981534952541 KDD Cup简介 KDD Cup is the annual Data Mining and Knowled
  • Win10系统VS2019+Cmake+gflags2.2.2环境配置

    1 gflags 1 1 简要介绍 gflags是google开源的一套命令行参数解析工具 使用C 开发 具备Python接口 可以替代getopt gflags使用起来比getopt方便 但是不支持参数的简写 例如getopt支持 lis
  • LLM-项目详解-KnowLM:信息抽取大模型

    GitHub zjunlp KnowLM Knowledgable Large Language Models Framework 随着深度学习技术的快速发展 大型语言模型如ChatGPT在自然语言处理领域已经取得了显著的成就 然而 这些大
  • c++的构造函数初始化列表

    C 类构造函数初始化列表 构造函数初始化列表以一个冒号开始 接着是以逗号分隔的数据成员列表 每个数据成员后面跟一个放在括号中的初始化式 例如 class CExample public int a float b 构造函数初始化列表 CEx
  • PCB设计误区-电源是不是必须从滤波电容进入芯片管脚(终结篇)

    PCB设计误区 电源是不是必须从滤波电容进入芯片管脚 终结篇
  • Mysql架构和InnoDB存储引擎流程

    一 整体架构和流程 二 流程图解析 这一共分为四个步骤 1 前台操作触发Mysql服务器执行请求 2 InnoDB存储引擎 缓冲池中完成更新的基本操作 3 Redo Log和BinLog保证事务的可靠性 4 将事务的操作持久化 一 a 前台
  • 在TypeScript使用React forwardRef

    React forwardRef 用于获取子结点的DOM元素引用 当结合TS使用时 需要注意类型断言 import forwardRef useEffect from react const Test forwardRef
  • Verilog十大基本功8 (flipflop和latch以及register的区别)

    来自1 https www cnblogs com LNAmp p 3295441 html 第一次接触Latch是在大二学习数电的时候 那时候Latch被翻译成锁存器 当时还纠结着锁存器和寄存器的区别 要是当时我知道他俩的英文名叫latc
  • Unity3D 画线函数(实现和虚线)

    1 若只需要在调试场景Scene里查看 不需要在Game运行场景看到 可以使用 Debug Draw 这个函数一般在Update Fixed Update LateUpdate里调用 并且不能设置材质 不过可以指定颜色 例子如下 void
  • 蓝牙之十八- bluetooth pair

    蓝牙之十八 bluetooth pair 在蓝牙核心规范2 1之后 蓝牙配对除了传统的PIN Code Pairing方式外 新增了Secure Simple Pairing配对方式 根据核心规范4 2 简单配对主要有两种目的 蓝牙配对过程
  • BDTC2014中国大数据技术大会

    2014中国大数据技术大会32位核心专家演讲PDF下载汇总 重磅资料 下载地址 http download csdn net detail zhongwen7710 8295907 2014中国大数据技术大会32位核心专家演讲PDF目录题目
  • 学习笔记 JavaScript ES6 声明方式const(一)

    今天学习ES6当中定义常量 先来复习下ES5当中是如何定义常量的 通过如下方法在一个对象上定义新的属性来定义一个常量 见如下代码 这个方法有3个参数 第1个参数是在哪个对象上定义属性 第2个参数是属性名称 第3个参数是对象 Object d
  • 孩子学习机器人法则

    现在社会学习机器人的好处有很多 由于小孩子正处于增长知识 发挥自身应有能力的年纪 格物斯坦表示让小孩子学习一门理论前沿性和实用性都较高的机器人编程教育对小孩子未来发展是非常有益的 首先机器人教育不是孤立存在的 机器人技术是多种学科综合的学科
  • Vue 使用 axios post请求后台数据时 404

    今天遇到Vue 使用 axios post请求后台数据时 404 使用postman 就能获取到 网上找了大半天 终于找到了解决方法 传送门 https www jianshu com p b10454ed38ba 转载于 https ww
  • C语言的一个正则表达式pcre

    1 简介 在C C 中 一个比较好的正则表达式是pcre 被很多工具 包括一些商用工具 使用 2 源码下载 安装 2 1 下载 可以从官网http www pcre org 下载 为方便学习 已放在这里http download csdn