• Login
Community
  • Login

How To Delete Specific String In Macro Recorder

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 1.2k 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.
  • A
    Anthony Jocius
    last edited by Jun 5, 2019, 2:37 PM

    I have very large text files which have all sorts of unwanted data. The data must be parsed to remove most of the unwanted text. I haven’t been able to write a “Search And Replace” which will cut some of this unwanted data. Would someone be so kind to show me how I can eliminate the unwanted text. Note the text preceding the “,Done” can be almost any name. So there needs to be a wildcard.

    Change From:
    ,Profile,Production,Cycle,Normal,PMVer,14.0.1.103,SeqFileVer,1.8.0.0,User,0000007456112,Station,TS-0457A,Socket,0,Date,04-17-2019,Time,13:11:09,CycleTime,722.903,Status,Passed,MAC_Address,F8DC7A205018,CycleTimes,Done,DEBUG_PRODUCTION_FALSE,…

    Change To:
    ,Profile,Production,Cycle,Normal,PMVer,14.0.1.103,SeqFileVer,1.8.0.0,User,0000007456112,Station,TS-0457A,Socket,0,Date,04-17-2019,Time,13:11:09,CycleTime,722.903,Status,Passed,MAC_Address,F8DC7A205018,DEBUG_PRODUCTION_FALSE,…

    What was removed:
    CycleTimes,Done,

    A 1 Reply Last reply Jun 5, 2019, 2:57 PM Reply Quote 1
    • A
      Alan Kilborn @Anthony Jocius
      last edited by Jun 5, 2019, 2:57 PM

      @Anthony-Jocius

      There must be more to the story as a simple replacement of CycleTimes,Done, with nothing seems to do the job…?

      1 Reply Last reply Reply Quote 0
      • A
        Anthony Jocius
        last edited by Jun 5, 2019, 3:37 PM

        The part of the string “CycleTimes” can be any text. That is the whole story. I’m new to Notepad++ and am trying to use it more efficiently.

        A 1 Reply Last reply Jun 5, 2019, 3:39 PM Reply Quote 1
        • A
          Alan Kilborn @Anthony Jocius
          last edited by Alan Kilborn Jun 5, 2019, 3:40 PM Jun 5, 2019, 3:39 PM

          I’d be tempted to try:

          Find: ,[^,]+,Done
          Replace: nothing
          Search mode: Regular expression

          The “funky part”, the [^,]+ means “one or more characters that aren’t comma”.

          1 Reply Last reply Reply Quote 1
          • A
            Anthony Jocius
            last edited by Jun 5, 2019, 5:39 PM

            Amazing. It works like a champ. Thank you for giving the pathway to much smaller text files. Thank you, sir.

            A 1 Reply Last reply Jun 5, 2019, 6:04 PM Reply Quote 2
            • A
              Alan Kilborn @Anthony Jocius
              last edited by Jun 5, 2019, 6:04 PM

              @Anthony-Jocius

              Amazing…

              Check out this link and the things it links to in order to really understand the magic. :)

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