On Sun, Apr 29, 2007 at 04:17:21PM +0200, [EMAIL PROTECTED] wrote:
> Hi,
> 
>  I am curious whether this kind of meta-regexp is
>  possible with vim:
> 
>  I want to match a certain kind of pattern and want to
>  do "something" with it.
>  
>  The kind of pattern does not describe a group of chars
>  but their relation to each other.
> 
>  Example:
>  I want to search for a number sequence like
>  1221
>  and also
>  2332
>  and also
>  3443
>  and also....
> 
>  Or:
>  I want to find a sequence of five identical characters. The 
>  character itsself doesn't matter.
> 
>  There is no limit to complexity of this kind of pattern. The only
>  limit seems to be my brain.
> 
>  Is there a kind of "general recipe" to construct such patterns and
>  to instruct vim to use them as wanted ?
> 
>  Happy editing!
>  mcc
> 
> -- 
> Please don't send me any Word- or Powerpoint-Attachments
> unless it's absolutely neccessary. - Send simply Text.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> In a world without fences and walls nobody needs gates and windows.
Five identical characters would be: /\[a-z,A-Z]\{4}/ I believe...

Numbers would be: /\d\d\{2}\d/

I really would recommendate this guide for regexp:
http://larc.ee.nthu.edu.tw/~cthuang/vim/files/vim-regex/vim-regex.htm

It's very good

regard
iveqy

Reply via email to