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

回复: Searching for single character without any thing around it , possible ?

Expand Messages
  • EdwardXu
    vim regex is a little different.Try ÔÚ 2010 Äê 7 31 ÈÕ£¬4:34 ÏÂÎ磬 Aaron Lewis ±àд£º ... Hash: SHA1 Hi,
    Message 1 of 2 , Jul 31, 2010

      vim regex is a little different.Try \<i\>

      在 2010 年 7 31 日,4:34 下午,"Aaron Lewis" <aaron.lewis1989@...>编写:

      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Hi,
             I've remembered that some implementations of RegExp has a '\b' sign ,
      e.g \bi\b means an character `i' without anything around it ,  does vim
      support it ?

             :help regular-expression seems to have that expression , but no much
      documents about it.

             Consider this:  int i = 0 ; i < numOfServ ; i ++
             And i'd like to replace the single `i' with j , so i tried s/\bi\b/j/g
      , not working ? Or maybe something else , anyone could help ?

             Thanks in advance !

      - --
      Best Regards,
      Aaron Lewis - PGP: 0x4A6D32A0
      FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
      irc: A4R0NL3WI5 on freenode
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v2.0.16 (GNU/Linux)
      Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

      iEYEARECAAYFAkxT3/wACgkQvf41sEptMqB/zACgw5o+ddyrH9so31APTpkm6z/5
      nmoAoKY1g8RJiqnscx/Gd9cMfWGFJnWr
      =UsVU
      -----END PGP SIGNATURE-----

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Aaron Lewis
      ... Hash: SHA1 ... Exactly what i m looking for , thanks ! ... - -- You received this message from the vim_use maillist. Do not top-post! Type your reply
      Message 2 of 2 , Jul 31, 2010
        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        On 07/31/2010 04:45 PM, EdwardXu wrote:
        > vim regex is a little different.Try \<i\>

        Exactly what i'm looking for , thanks !

        >
        > 在 2010 年 7 31 日,4:34 下午,"Aaron Lewis" <aaron.lewis1989@...>编写:
        >
        > Hi,
        > I've remembered that some implementations of RegExp has a '\b' sign ,
        > e.g \bi\b means an character `i' without anything around it , does vim
        > support it ?
        >
        > :help regular-expression seems to have that expression , but no much
        > documents about it.
        >
        > Consider this: int i = 0 ; i < numOfServ ; i ++
        > And i'd like to replace the single `i' with j , so i tried
        > s/\bi\b/j/g
        > , not working ? Or maybe something else , anyone could help ?
        >
        > Thanks in advance !
        >

        - --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php



        - --
        Best Regards,
        Aaron Lewis - PGP: 0x4A6D32A0
        FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
        irc: A4R0NL3WI5 on freenode
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v2.0.16 (GNU/Linux)
        Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

        iEYEARECAAYFAkxT838ACgkQvf41sEptMqCXHACgnkerdE93VHKkRRnJsupf8dA5
        1IkAoMAaTnlLVIX5KTUVDGVIB5/BTKc5
        =CH+Z
        -----END PGP SIGNATURE-----

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.