Friday, March 13, 2015

Re: Searching for lines with different numbers

Hi Ethan,

thanks fpor your reply ! :)

...it does nearly work...;)

The first part of the expression only catches one digit and
compares this to the digits of the second number, which
is different most of the time...

Best regards,
mcc




Ethan Hereth <advocateddrummer@gmail.com> [15-03-14 06:40]:
> Hi mcc,
>
> On Sat, Mar 14, 2015 at 12:37 AM, <Meino.Cramer@gmx.de> wrote:
>
> >
> > Hi,
> >
> > I have a logfiles (Gentoo: 'qcheck -a' ), which contains lines like:
> >
> > Checking dev-lua/luasocket-3.0_rc1-r3 ...
> > * 69 out of 69 files are good
> >
> > Lines contains "<number_a> out of <number_b> files are good"
> >
> > Is it possible to find all lines, where "<number_a>" differs from
> > "<number_b>" ? Does work backrefrences here?
> >
>
> I was able to find the lines in question with the following search
>
> /\(.\) out of \1\@!.*files match
>
> Here, \@! makes sure that \1 (which refers to the \(.\) capturing group
> that contains the first number found) does not match at that position.
>
> Does this work for you?
>
> Ethan Alan
>
>
> > Best regards,
> > mcc
> >
> >
> >
> > --
> > --
> > 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 because you are subscribed to the Google Groups
> > "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to vim_use+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> --
> 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 because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: