non exact duplicates - Editors
This is a discussion on non exact duplicates - Editors ; Can vim find these as duplicates
abcdef [AA_ind_pte_y]
abcdef [RZ_ind_pde_y]
abcdef [AB_iod_pre_y]
and gives this out put
abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
Thanks...
-
non exact duplicates
Can vim find these as duplicates
abcdef [AA_ind_pte_y]
abcdef [RZ_ind_pde_y]
abcdef [AB_iod_pre_y]
and gives this out put
abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
Thanks
-
Re: non exact duplicates
julia_2683@hotmail.com schrieb:
> Can vim find these as duplicates
>
> abcdef [AA_ind_pte_y]
> abcdef [RZ_ind_pde_y]
> abcdef [AB_iod_pre_y]
>
> and gives this out put
> abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
>
> Thanks
Vim can.
Search in this group for
joining together multiple lines
hth
Ralf
-
Re: non exact duplicates
julia_2683@hotmail.com wrote:
> Can vim find these as duplicates
>
> abcdef [AA_ind_pte_y]
> abcdef [RZ_ind_pde_y]
> abcdef [AB_iod_pre_y]
>
> and gives this out put
> abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
>
Ju
This might help or give you an idea
:g/^abcdef/-j|s/ abcdef/,/g
--
zzapper
Best of VimTips
http://www.vim.org/tips/tip.php?tip_id=305
-
Re: non exact duplicates
zzapper wrote:
> julia_2683@hotmail.com wrote:
>
> > Can vim find these as duplicates
> >
> > abcdef [AA_ind_pte_y]
> > abcdef [RZ_ind_pde_y]
> > abcdef [AB_iod_pre_y]
> >
> > and gives this out put
> > abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
> >
> Ju
>
> This might help or give you an idea
>
> :g/^abcdef/-j|s/ abcdef/,/g
>
> --
> zzapper
> Best of VimTips
> http://www.vim.org/tips/tip.php?tip_id=305
g/^abcdef/-j|s/ abcdef/,/g
This help me a lot but if you explain the command I can extend it to
another situation. My problem is that I have more complex strings than
abcdef and I have also different strings.
I tried many things but have no idea how to find near duplicates and
move the annotation, so I have only one string by line with multiple
annotations.
abcdef derft gert [AA_ind_pte_y]
abcdef dreft gert [RZ_ind_pde_y]
abcdef dreft gert [AB_iod_pre_y]
bcdef erft ger [AA_ind_pte_y]
abcef dre gert [RZ_ind_pde_y]
abcf dreft gert [AB_iod_pre_y]
abcf dreft gert [AC_iod_pre_y]
Thanks for your help
-
Re: non exact duplicates
julia_2683@hotmail.com schrieb:
> zzapper wrote:
> > julia_2683@hotmail.com wrote:
> >
> > > Can vim find these as duplicates
> > >
> > > abcdef [AA_ind_pte_y]
> > > abcdef [RZ_ind_pde_y]
> > > abcdef [AB_iod_pre_y]
> > >
> > > and gives this out put
> > > abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
> > >
> > Ju
> >
> > This might help or give you an idea
> >
> > :g/^abcdef/-j|s/ abcdef/,/g
> >
> > --
> > zzapper
> > Best of VimTips
> > http://www.vim.org/tips/tip.php?tip_id=305
>
> g/^abcdef/-j|s/ abcdef/,/g
> This help me a lot but if you explain the command I can extend it to
> another situation. My problem is that I have more complex strings than
> abcdef and I have also different strings.
> I tried many things but have no idea how to find near duplicates and
> move the annotation, so I have only one string by line with multiple
> annotations.
>
> abcdef derft gert [AA_ind_pte_y]
> abcdef dreft gert [RZ_ind_pde_y]
> abcdef dreft gert [AB_iod_pre_y]
> bcdef erft ger [AA_ind_pte_y]
> abcef dre gert [RZ_ind_pde_y]
> abcf dreft gert [AB_iod_pre_y]
> abcf dreft gert [AC_iod_pre_y]
>
> Thanks for your help
Hello,
:g/\v%(^\1.*\n)@<=%(([^[]+)(.*))/s//,\2/|-j!
could help, but only if you have no different spaces in the search
string
Ralf
-
Re: non exact duplicates
RalfB wrote:
> julia_2683@hotmail.com schrieb:
>
> > zzapper wrote:
> > > julia_2683@hotmail.com wrote:
> > >
> > > > Can vim find these as duplicates
> > > >
> > > > abcdef [AA_ind_pte_y]
> > > > abcdef [RZ_ind_pde_y]
> > > > abcdef [AB_iod_pre_y]
> > > >
> > > > and gives this out put
> > > > abcdef [AA_ind_pte_y], [RZ_ind_pde_y], [AB_iod_pre_y]
> > > >
> > > Ju
> > >
> > > This might help or give you an idea
> > >
> > > :g/^abcdef/-j|s/ abcdef/,/g
> > >
> > > --
> > > zzapper
> > > Best of VimTips
> > > http://www.vim.org/tips/tip.php?tip_id=305
> >
> > g/^abcdef/-j|s/ abcdef/,/g
> > This help me a lot but if you explain the command I can extend it to
> > another situation. My problem is that I have more complex strings than
> > abcdef and I have also different strings.
> > I tried many things but have no idea how to find near duplicates and
> > move the annotation, so I have only one string by line with multiple
> > annotations.
> >
> > abcdef derft gert [AA_ind_pte_y]
> > abcdef dreft gert [RZ_ind_pde_y]
> > abcdef dreft gert [AB_iod_pre_y]
> > bcdef erft ger [AA_ind_pte_y]
> > abcef dre gert [RZ_ind_pde_y]
> > abcf dreft gert [AB_iod_pre_y]
> > abcf dreft gert [AC_iod_pre_y]
> >
> > Thanks for your help
> Hello,
>
> :g/\v%(^\1.*\n)@<=%(([^[]+)(.*))/s//,\2/|-j!
>
>
> could help, but only if you have no different spaces in the search
> string
>
> Ralf
Genious. Thanks Ralf it works for me but with a bit of explanation will
help for the future.
-
Re: non exact duplicates
julia_2683@hotmail.com schrieb:
> Genious. Thanks Ralf it works for me but with a bit of explanation will
> help for the future.
As I said in my first reply:
"Search in this group for
joining together multiple lines"
There you can find the original posting of this really genios regexp
from Antony Scriven and some explanation.
best regards
Ralf
Similar Threads
-
By Application Development in forum Perl
Replies: 17
Last Post: 05-30-2007, 05:31 PM
-
By Application Development in forum Editors
Replies: 1
Last Post: 05-28-2007, 03:18 PM
-
By Application Development in forum awk
Replies: 4
Last Post: 10-26-2005, 03:53 PM
-
By Application Development in forum Inetserver
Replies: 2
Last Post: 09-07-2005, 08:43 PM
-
By Application Development in forum Microsoft Exchange
Replies: 0
Last Post: 06-27-2005, 11:56 AM