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

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

Expand Messages
  • ginkgo
    Jul 1, 2009
    • 0 Attachment
      On Jul 1, 5:47 pm, "A. S. Budden" <abud...@...> wrote:
      > 2009/7/1 ginkgo <mydor...@...>:
      >
      >
      >
      > > Hello everyone,
      > >  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.
      > > Can anyone help me?
      >
      > How about:
      >
      > /^\s\+\S\+\zs\s
      >
      > /    - Search
      > ^    - Start of the line
      > \s\+ - One or more spaces (replace \+ with * if you don't mind whether
      > there are spaces)
      > \S\+ - One or more non-space characters
      > \zs  - Start the match from here (so ignore everything before)
      > \s   - A space
      >
      > Al

      Thank for quick reply, you pattern work for this case.
      I think I do not say clear, the other example
      sss sss ss
      ^^^^ ^^ ^^ ^^

      just match the second part. I want to match the 2,3,4 part

      regard
      ginkgo
      --~--~---------~--~----~------------~-------~--~----~
      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