POSIX extended Regular expression functions

Source: Internet
Author: User
Tags ereg posix

1, Ereg () function and eregi () function

function Syntax:

  BOOL Ereg/eregi (string pattern, string string [, array regs])

function function:

  Matches the expression pattern in string strings and returns False if the match returns true successfully. If there is a 3rd argument regs, the successfully matched string is divided into substrings (sub-expressions) and stored in the regs array. Ereg are case-sensitive, while eregi are case-insensitive.

2, ereg_replace () function and eregi_replace () function

function Syntax:

  String Ereg_replace/eregi_replace (string pattern, string replacement, string string)

function function:

  Matches the expression pattern in string strings. If the match succeeds, the match string is replaced with replacement and the replaced string is returned. Eregi_replace () is case insensitive.

3. Split () function and Spliti () function

function Syntax:

 Array Split/spliti (string pattern, string string [, int limit])

function function:

  Use the expression pattern to split string strings. If there is a parameter limit, the array has a maximum of limit elements, and the remainder is written to the last array element. Returns False if the function is wrong. The split () function is case-sensitive and the Spliti () function is case insensitive.

POSIX extended Regular expression functions

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.