How To Delete Specific String In Macro Recorder
-
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, -
There must be more to the story as a simple replacement of
CycleTimes,Done,with nothing seems to do the job…? -
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.
-
I’d be tempted to try:
Find:
,[^,]+,Done
Replace: nothing
Search mode: Regular expressionThe “funky part”, the
[^,]+means “one or more characters that aren’t comma”. -
Amazing. It works like a champ. Thank you for giving the pathway to much smaller text files. Thank you, sir.
-
Amazing…
Check out this link and the things it links to in order to really understand the magic. :)
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