FAQ
I saw a Regex:

(?i:(j?sessionid|(php)?sessid|(asp|jserv|jw)?session[-_]?(id)?|cf(id|token)|sid))


I especially didn't know what the leading "?i:" means.
Please help, thanks!

Search Discussions

  • John W. Krahn at Feb 12, 2009 at 3:55 am

    practicalperl@gmail.com wrote:
    I saw a Regex:

    (?i:(j?sessionid|(php)?sessid|(asp|jserv|jw)?session[-_]?(id)?|cf(id|token)|sid))


    I especially didn't know what the leading "?i:" means.
    Please help, thanks!
    The /i option means that everything inside the parentheses is a case
    insensitive pattern.


    John
    --
    Those people who think they know everything are a great
    annoyance to those of us who do. -- Isaac Asimov
  • Dr.Ruud at Feb 12, 2009 at 9:28 am

    practicalperl@gmail.com wrote:

    I saw a Regex:

    (?i:(j?sessionid|(php)?sessid|(asp|jserv|jw)?session[-_]?(id)?|cf(id|token)|sid))


    I especially didn't know what the leading "?i:" means.
    It is a modifier, see perlre.

    --
    Ruud
  • Michael Paoli at Feb 17, 2009 at 2:33 am

    On Feb 11, 7:46 pm, practicalperl@gmail.com wrote:
    I saw a Regex:

    (?i:(j?sessionid|(php)?sessid|(asp|jserv|jw)?session[-_]?(id)?|cf(id|token)|sid))

    I especially didn't know what the leading "?i:" means.
    Please help, thanks!
    So, ... isn't this much more readable:

    (?ix:
    (
    j?sessionid

    (php)?sessid

    (asp|jserv|jw)?session[-_]?(id)?

    cf(id|token)
    sid
    )
    )

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedFeb 12, '09 at 3:46a
activeFeb 17, '09 at 2:33a
posts4
users4
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase