Community
    • Login

    Search and replace/delete timestamps in brackets []

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 267 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PoldiP
      Poldi
      last edited by

      I have a transcript that starts each line with a timestamp followed by 2 spaces and text, like this:

      [00:00:00] Line 1
      [00:00:02] Line 2

      How can I search and replace(delete) all those timestamps and one of the spaces? Would be great if the line break would also be deleted, but not necessary.

      Regards

      CoisesC 1 Reply Last reply Reply Quote 0
      • CoisesC
        Coises @Poldi
        last edited by

        @Poldi

        Select Search | Replace… from the main menu; then fill in:

        Find what: (\A|\R)\[.*?\]\h*
        Replace with: a single space
        Search Mode: Regular expression

        then click Replace All. (You’ll wind up with one extra space at the beginning of the file, which you can delete by hand.)

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors