Regex C language

Source: Internet
Author: User
Tags preg

I've been working on the C language recently, and the C tutorial on regular expressions has seen the Man Handbook Feel good.

Regex (3) Linux Programmer ' s Manual REGEX (3)

NAME
Regcomp, Regexec, Regerror, regfree-posix regex functions

Synopsis
#include <sys/types.h>
#include <regex.h>

int Regcomp (regex_t *preg, const char *regex, int cflags);

int regexec (const regex_t *preg, const char *string, size_t Nmatch,
regmatch_t pmatch[], int eflags);

size_t regerror (int errcode, const regex_t *preg, Char *errbuf,
size_t errbuf_size);

void RegFree (regex_t *preg);

If it's not enough

Other than that

https://www.jianshu.com/p/9cda6b29a12b

Http://blog.chinaunix.net/uid-20448327-id-3189854.html

can also see, I just do not understand why "\\b" is not going to die, it is estimated that there is a bug, but I use [0-9] instead of, harmless

Regex C language

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.