Professional Web Applications Themes

k operator in REGEX?? - PERL Miscellaneous

Hello everyone! Can somenone tell me what the following regex means? "(?k:(?k:$_[0])(?k:[^\n]*)(?k:\n))" what is the k?? What does it means?? This gives me errors!! Thank you all... -- Posted via [url]http://dbforums.com[/url]...

  1. #1

    Default k operator in REGEX??


    Hello everyone!

    Can somenone tell me what the following regex means?

    "(?k:(?k:$_[0])(?k:[^\\n]*)(?k:\\n))"

    what is the k?? What does it means??

    This gives me errors!!

    Thank you all...

    --
    Posted via [url]http://dbforums.com[/url]
    darkname Guest

  2. #2

    Default Re: k operator in REGEX??

    Abigail <abigailabigail.nl> writes:
    > perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    > / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
    > % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
    > BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
    I think my brain is melting.

    Charlton
    Charlton Wilbur Guest

  3. #3

    Default Re: k operator in REGEX??

    Charlton Wilbur (cwilburmithril.chromatico.net) wrote on MMMDXCII
    September MCMXCIII in <URL:news:8765mkslic.fsfmithril.chromatico.net> :
    "" Abigail <abigailabigail.nl> writes:
    ""
    "" > perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    "" > / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
    "" > % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
    "" > BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
    ""
    "" I think my brain is melting.


    I gave a talk about this one two years ago on YAPC, and the punchline
    for this JAPH is: "The question is not what it does, but why does it
    compile?".



    Abigail
    --
    perl -we '$="\145\143\150\157\040\042\112\165\163\164\040\ 141\156\157\164".
    "\150\145\162\040\120\145\162\154\040\110\141\143\ 153\145\162".
    "\042\040\076\040\057\144\145\166\057\164\164\171" ;`$`'
    Abigail Guest

  4. #4

    Default Re: k operator in REGEX??

    Abigail <abigailabigail.nl> wrote in
    news:slrnbg6id3.mu3.abigailalexandra.abigail.nl:
    > I gave a talk about this one two years ago on YAPC, and the punchline
    > for this JAPH is: "The question is not what it does, but why does it
    > compile?".
    Being a newbie, I am very curious about what the heck is going on in those
    few lines. Is there an online reference to that talk and if not, would you
    mind explaining it a little.

    Sinan.

    --
    A. Sinan Unur
    [email]asu1c-o-r-n-e-l-l.edu[/email]
    Remove dashes for address
    Spam bait: mailto:uceftc.gov
    A. Sinan Unur Guest

  5. #5

    Default Re: k operator in REGEX??

    A. Sinan Unur (asu1c-o-r-n-e-l-l.edu) wrote on MMMDXCII September
    MCMXCIII in <URL:news:Xns93ACB30C515C4asu1cornelledu132.236.5 6.8>:
    \\ Abigail <abigailabigail.nl> wrote in
    \\ news:slrnbg6id3.mu3.abigailalexandra.abigail.nl:
    \\
    \\ > I gave a talk about this one two years ago on YAPC, and the punchline
    \\ > for this JAPH is: "The question is not what it does, but why does it
    \\ > compile?".
    \\
    \\ Being a newbie, I am very curious about what the heck is going on in those
    \\ few lines. Is there an online reference to that talk and if not, would you
    \\ mind explaining it a little.


    [url]http://perl.abigail.nl/Talks/Japhs/[/url] and
    [url]http://perl.abigail.nl/Talks/Japhs-II/[/url]

    I think the one you are asking about is discussed in the former talk.


    Abigail
    --
    perl -wle 'eval {die [[qq [Just another Perl Hacker]]]};; print
    ${${${}}[$#{{${}}}]}[$#{${{${}}}[$#{{${}}}]}]'
    Abigail Guest

  6. #6

    Default Re: k operator in REGEX??


    [Yes i took it frim there in order to try to get and enhance the Regex
    to catch multiline comments in order to catch comments in PL/SQL!!

    Do you have any suggestion?

    Thank you.. and sorry for trying to use your code!!!

    Can i use it?

    Thanks!

    --
    Posted via [url]http://dbforums.com[/url]
    darkname Guest

  7. #7

    Default Re: k operator in REGEX??


    The comments in PL/SQL are very simple!

    There are two types of comments:

    -- This is a comment

    /*This is a comment*/

    /* This
    is
    a
    comment*/

    As you can see the -- represents an one line comment, and the /* */ can
    be either a multiline comment or just one line comment!

    Thank for your help and sorry for my late reply!

    Nuno


    Originally posted by Abigail
    > darkname (member31962dbforums.com) wrote on MMMDXCIII September
    > MCMXCIII
    > in :
    > ==
    > == [Yes i took it frim there in order to try to get and enhance the
    > == Regex
    > == to catch multiline comments in order to catch comments in PL/SQL!!
    >
    > If you give me a pointer to a specification of PL/SQL, or at least of
    > its comment syntax, I'll add a regexp for it in Regexp::Common.
    >
    > ==
    > == Do you have any suggestion?
    > ==
    > == Thank you.. and sorry for trying to use your code!!!
    > ==
    > == Can i use it?
    >
    >
    > Yes.
    >
    >
    > Abigail
    > --
    > map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
    print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";


    --
    Posted via [url]http://dbforums.com[/url]
    darkname Guest

Similar Threads

  1. operator
    By Gyger in forum PHP Development
    Replies: 3
    Last Post: August 18th, 07:18 AM
  2. XOR operator?
    By Daniel Carrera in forum Ruby
    Replies: 9
    Last Post: October 29th, 12:16 AM
  3. operator |=
    By ··········· sylvain in forum PHP Development
    Replies: 7
    Last Post: September 22nd, 11:34 AM
  4. or operator
    By Paul Kraus in forum PERL Beginners
    Replies: 0
    Last Post: August 29th, 05:58 PM
  5. BETWEEN OPERATOR
    By LPT in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 3rd, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139