{
    "mode": "perldoc",
    "parameter": "Regexp::Common::delimited",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Regexp%3A%3ACommon%3A%3Adelimited/json",
    "generated": "2026-06-11T06:00:07Z",
    "synopsis": "use Regexp::Common qw /delimited/;\nwhile (<>) {\n/$RE{delimited}{-delim=>'\"'}/  and print 'a \\\" delimited string';\n/$RE{delimited}{-delim=>'/'}/  and print 'a \\/ delimited string';\n}",
    "sections": {
        "NAME": {
            "content": "Regexp::Common::delimited -- provides a regex for delimited strings\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Regexp::Common qw /delimited/;\n\nwhile (<>) {\n/$RE{delimited}{-delim=>'\"'}/  and print 'a \\\" delimited string';\n/$RE{delimited}{-delim=>'/'}/  and print 'a \\/ delimited string';\n}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Please consult the manual of Regexp::Common for a general description of the works of this\ninterface.\n\nDo not use this module directly, but load it via *Regexp::Common*.\n\n$RE{delimited}{-delim}{-cdelim}{-esc}\nReturns a pattern that matches a single-character-delimited substring, with optional internal\nescaping of the delimiter.\n\nWhen \"-delim =\" *S*> is specified, each character in the sequence *S* is a possible delimiter.\nThere is no default delimiter, so this flag must always be specified.\n\nBy default, the closing delimiter is the same character as the opening delimiter. If this is not\nwanted, for instance, if you want to match a string with symmetric delimiters, you can specify\nthe closing delimiter(s) with \"-cdelim =\" *S*>. Each character in *S* is matched with the\ncorresponding character supplied with the \"-delim\" option. If the \"-cdelim\" option has less\ncharacters than the \"-delim\" option, the last character is repeated as often as necessary. If\nthe \"-cdelim\" option has more characters than the \"-delim\" option, the extra characters are\nignored.\n\nIf \"-esc =\" *S*> is specified, each character in the sequence *S* is the delimiter for the\ncorresponding character in the \"-delim=*S*\" list. The default escape is backslash.\n\nFor example:\n\n$RE{delimited}{-delim=>'\"'}               # match \"a \\\" delimited string\"\n$RE{delimited}{-delim=>'\"'}{-esc=>'\"'}    # match \"a \"\" delimited string\"\n$RE{delimited}{-delim=>'/'}               # match /a \\/ delimited string/\n$RE{delimited}{-delim=>q{'\"}}             # match \"string\" or 'string'\n$RE{delimited}{-delim=>\"(\"}{-cdelim=>\")\"} # match (string)\n\nUnder \"-keep\" (See Regexp::Common):\n\n$1  captures the entire match\n\n$2  captures the opening delimiter\n\n$3  captures delimited portion of the string\n\n$4  captures the closing delimiter\n\n$RE{quoted}{-esc}\nA synonym for \"$RE {delimited} {-delim => q {'\"`}} {...}\".\n\n$RE {bquoted} {-esc}\nThis is a pattern which matches delimited strings, where the delimiters are a set of matching\nbrackets. Currently, this comes 85 pairs. This includes the 60 pairs of bidirection paired\nbrackets, as listed in <http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt>.\n\nThe other 25 pairs are the quotation marks, the double quotation marks, the single and double\npointing quoation marks, the heavy single and double commas, 4 pairs of top-bottom parenthesis\nand brackets, 9 pairs of presentation form for vertical brackets, and the low paraphrase, raised\nomission, substitution, double substitution, and transposition brackets.\n\nIn a future update, pairs may be added (or deleted).\n\nThis pattern requires perl 5.14.0 or higher.\n\nFor a full list of bracket pairs, inspect the output of \"Regexp::Common::delimited::bracketpair\n()\", which returns a list of two element arrays, each holding the Unicode names of matching pair\nof delimiters.\n\nThe \"{-esc => *S* }\" works as in the \"$RE {delimited}\" pattern.\n\nIf \"{-keep}\" is given, the following things will be captured:\n\n$1  captures the entire match\n\n$2  captures the opening delimiter\n\n$3  captures delimited portion of the string\n\n$4  captures the closing delimiter\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Regexp::Common for a general description of how to use this interface.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Damian Conway (damian@conway.org)\n",
            "subsections": []
        },
        "MAINTENANCE": {
            "content": "This package is maintained by Abigail (*regexp-common@abigail.be*).\n",
            "subsections": []
        },
        "BUGS AND IRRITATIONS": {
            "content": "Bound to be plenty.\n\nFor a start, there are many common regexes missing. Send them in to *regexp-common@abigail.be*.\n\nLICENSE and COPYRIGHT\nThis software is Copyright (c) 2001 - 2017, Damian Conway and Abigail.\n\nThis module is free software, and maybe used under any of the following licenses:\n\n1) The Perl Artistic License.     See the file COPYRIGHT.AL.\n2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.\n3) The BSD License.               See the file COPYRIGHT.BSD.\n4) The MIT License.               See the file COPYRIGHT.MIT.\n",
            "subsections": []
        }
    },
    "summary": "Regexp::Common::delimited -- provides a regex for delimited strings",
    "flags": [],
    "examples": [],
    "see_also": []
}