Dokumentation zu: regexplode(E)

HR Image


SYNOPSIS
        #include <regexp.h>

        string * regexplode(string text, string pattern)
        string * regexplode(string text, string pattern, int opt)

DESCRIPTION
        This function is similar to explode but accepts a regular
        expression <pattern> as delimiter (interpreted according to <opt>
        if given).

        If flag RE_OMIT_DELIM is not set in <opt>, then every second element
        in the result vector will be the text that matched the delimiter.
        If the flag is set, then the result vector will contain only
        the text between the delimiters.

EXAMPLES
        regexplode("abcdef", "cde")                -> ({ "ab", "cde", "f" })
        regexplode("abcdef", "cde", RE_OMIT_DELIM) -> ({ "ab", "f" })

HISTORY
        Introduced in 3.2@61.
        LDMud 3.3 added the optional <opt> argument and the RE_OMIT_DELIM
          flag.
        Since 3.5.0 a error is raised if RE_PCRE is specified in <opt>, but
        the driver lacks PCRE support.

SEE ALSO
        explode(E), regexp(E), regmatch(E), regreplace(E),
        regexp_package(E), regexp(C)

Die Seite ist auch in Deutsch vorhanden.

Start » Magierhandbuch » Docu » Efun » Regexplode Letzte Generierung: 25.04.2021, 01:58
Email an: mud@wl.mud.de
Valid HTML 4.01!