{
    "mode": "perldoc",
    "parameter": "Regexp::Common::whitespace",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Regexp%3A%3ACommon%3A%3Awhitespace/json",
    "generated": "2026-08-05T21:55:24Z",
    "synopsis": "use Regexp::Common qw /whitespace/;\nwhile (<>) {\ns/$RE{ws}{crop}//g;           # Delete surrounding whitespace\n}",
    "sections": {
        "NAME": {
            "content": "Regexp::Common::whitespace -- provides a regex for leading or trailing whitescape\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Regexp::Common qw /whitespace/;\n\nwhile (<>) {\ns/$RE{ws}{crop}//g;           # Delete surrounding whitespace\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{ws}{crop}\"\nReturns a pattern that identifies leading or trailing whitespace.\n\nFor example:\n\n$str =~ s/$RE{ws}{crop}//g;     # Delete surrounding whitespace\n\nThe call:\n\n$RE{ws}{crop}->subs($str);\n\nis optimized (but probably still slower than doing the s///g explicitly).\n\nThis pattern does not capture under \"-keep\".\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::whitespace -- provides a regex for leading or trailing whitescape",
    "flags": [],
    "examples": [],
    "see_also": []
}