11 Replies Latest reply on Mar 18, 2014 5:17 AM by camilo umana

    Problem in grep: character formatting is damaged

    camilo umana Level 1

      In a text is required to modify the position of the year to the beginning of the line.

       

      Original: (italics have a character style)

       

      Exposición. Roda. Pinturas. Barcelona: Galería Pictoria, 1946.

      En Sala Libros expone Roda. Zaragoza: Sala Libros, 1946.

      Roda. Pinturas. Barcelona: Sala Caralt, 1947.

       

       

      Output:

      1946          Exposición. Roda. Pinturas. Barcelona: Galería Pictoria.

      1946          En Sala Libros expone Roda. Zaragoza: Sala Libros.

      1947          Roda. Pinturas. Barcelona: Sala Caralt.


      (italics don't have a character style)

      1946          Exposición. Roda. Pinturas. Barcelona: Galería Pictoria.

      1946          En Sala Libros expone Roda. Zaragoza: Sala Libros.

      1947          Roda. Pinturas. Barcelona: Sala Caralt.


       

      ^(.+)(, )(\d{4})

      $3\t$1



       

      This regex counts the original number of characters beginning the line for later doing the same to the changed line.

      Paragraph style has not a nested style or a grep style.

      In change, no style is applied.