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

Re: In search of a Regexpert ...

Expand Messages
  • meino.cramer@gmx.de
    Hi christian.brabandt ...thanks for the inspirations...now it works Regards, mcc ... -- Please don t send me any Word- or Powerpoint-Attachments unless it s
    Message 1 of 3 , Nov 8, 2009
      Hi christian.brabandt

      ...thanks for the inspirations...now it works

      Regards,
      mcc



      Christian Brabandt <cblists@...> [09-11-08 14:24]:
      >
      > Hi meino.cramer!
      >
      > On So, 08 Nov 2009, meino.cramer@... wrote:
      >
      > > tag_1>text_1</tag_1>
      > > tag_2>text_2</tag_2>
      > > tag_3>text_3</tag_3>
      > > tag_4>text_4</tag_4>
      > > tag_5>text_5</tag_5>
      > >
      > > and currently I cannot manage to remove the
      > >
      > > 'tag_<n>>' from the beginning of each line. Unfortunately
      > > the tags are of different lengths so a simple visual block
      > > deletion does not work here. I tried:
      > >
      > >
      > > :'<,'>s/^[^\>]\+>//g
      >
      > This works for me on your sample text, you have given above. You can
      > also try to use a non-greedy expression:
      >
      > s/^.\{-\}>//g
      >
      > Which should delete everything from line start to the first closing
      > bracket >
      >
      > > with the text in a visual block but it states to not to
      > > find the regexp'ed text.
      >
      > Alternatively, you can visually select the first column, search for >
      > and then press d to delete the visual selected range.
      >
      >
      > regards,
      > Christian
      > --
      > • "Regression testing"? What's that? If it compiles, it is good, if it boots
      > up it is perfect.
      > Torvalds, Linus (1998-04-08).
      >
      > >

      --
      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.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.