Community
    • Login

    Search and replace/delete timestamps in brackets []

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 644 Views 1 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors