11 Replies Latest reply on Jul 16, 2014 9:21 PM by michelangelo

    grep problem

    michelangelo

      I get a text with schedules and events. I have to replace the space after hours with a tab.
      example:
      10:30 text 1
      15:35 text 2
      15:55 text 3
      which must become
      10:30 ^t text 1
      15:35 ^t text 2
      15:55 ^t text 3
      (no space before and after ^t ... I used "^t" for clarification)
      The principle I would say is this:
      Replace ":nn " (:, number, number, space) with ":nn^t" (:, number, number, tabulator) where n is any number, but it should be changed instead. Does anyone have a suggestion?