?-xism:

Discussion in 'Perl Misc' started by fishfry, Feb 5, 2004.

  1. fishfry

    fishfry Guest

    The statement

    print qr/abc/;

    produces the output

    (?-xism:abc)

    I looked in man perlop and didn't find a clear description of what this
    means. Where's this documented? What's it mean?
    fishfry, Feb 5, 2004
    #1
    1. Advertising

  2. fishfry <> wrote:

    > The statement
    >
    > print qr/abc/;
    >
    > produces the output
    >
    > (?-xism:abc)
    >
    > I looked in man perlop and didn't find a clear description of what this
    > means. Where's this documented? What's it mean?


    Try perlre instead.

    "(?imsx-imsx)"
    One or more embedded pattern-match modifiers, to be turned on
    (or turned off, if preceded by "-") for the remainder of the
    pattern or the remainder of the enclosing pattern group (if
    any). This is particularly useful for dynamic patterns, such
    ...

    --
    David Wall
    David K. Wall, Feb 5, 2004
    #2
    1. Advertising

  3. fishfry

    gnari Guest

    Re:

    "fishfry" <> wrote in message
    news:...
    > The statement
    >
    > print qr/abc/;
    >
    > produces the output
    >
    > (?-xism:abc)
    >
    > I looked in man perlop and didn't find a clear description of what this
    > means. Where's this documented? What's it mean?


    try perlre

    gnari
    gnari, Feb 5, 2004
    #3
  4. fishfry

    Andy Hassall Guest

    On Thu, 05 Feb 2004 22:05:39 GMT, fishfry <>
    wrote:

    >The statement
    >
    > print qr/abc/;
    >
    >produces the output
    >
    >(?-xism:abc)
    >
    >I looked in man perlop and didn't find a clear description of what this
    >means. Where's this documented? What's it mean?


    perldoc perlre



    See also module YAPE::Regex::Explain
    <http://theoryx5.uwinnipeg.ca/CPAN/data/YAPE-Regex-Explain/Explain.html>

    ... which says:

    The regular expression:

    (?-imsx:abc)

    matches as follows:

    NODE EXPLANATION
    ----------------------------------------------------------------------
    (?-imsx: group, but do not capture (case-sensitive)
    (with ^ and $ matching normally) (with . not
    matching \n) (matching whitespace and #
    normally):
    ----------------------------------------------------------------------
    abc 'abc'
    ----------------------------------------------------------------------
    ) end of grouping
    ----------------------------------------------------------------------

    --
    Andy Hassall <> / Space: disk usage analysis tool
    <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
    Andy Hassall, Feb 7, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page