Loading ...
Sorry, an error occurred while loading the content.
 

Re: Regexp pattern matching problem

Expand Messages
  • Bram Moolenaar
    ... Yes, there is something wrong with (x ) +. I didn t have time yet to look into it (still trying to fix a broken PC, got some new parts and upgraded my
    Message 1 of 2 , Mar 3, 2005
      Chip Campbell wrote:

      > Here's a regexp problem (Vim 7.0aa snapshot 0053):
      >
      > ---------------------------------------------------------------------
      > int x;
      > static int y;
      > ---------------------------------------------------------------------
      > :set hls
      > /^\%(\h\w*\s\+\)\+
      >
      > I think that
      > "int " should be highlighted as matching
      > "static int " should be highlighted as matching
      >
      > Instead, I see
      > "int " getting matched
      > "static " getting matched

      Yes, there is something wrong with \(x\)\+. I didn't have time yet to
      look into it (still trying to fix a broken PC, got some new parts and
      upgraded my FreeBSD system to an Athlon 64 so that the old processor can
      go to the broken PC).

      --
      ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
      Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
      cow or goose hitting them still. The KNIGHTS crouch down under cover.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.