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

105482Re: how to match the space Not begin from the start-of-line

Expand Messages
  • Tim Chase
    Jul 1, 2009
    • 0 Attachment
      >>> I want to know how to match the space that is not in the start of
      >>> the line.
      >>> for example
      >>> sss sss
      >>> ^^^^ ^
      >>> I just match the second part of the sample.
      >>
      >> \%(^\s*\)\@<!\s
      >
      > thanks Tim , I think your atom work well. I know the \@<! , but I use
      > the \%(^\s\+\)\@<!\s ,
      > can you tell me, why the \s\+ not work well, but the \s* work well

      They should be nearly equiv., with the only difference being the
      "\+" version *requires* that the line start with whitespace (one
      or more whitespace characters) whereas the "*" version allows the
      line to start without -whitespace. This also finds *all* the
      non-leading whitespace on the line. If you want just the first
      space, A.S. Budden posed a good solution.

      -tim




      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 7 messages in this topic