For example I have:
Apple:123456789:pear
watermelon:57952161354:kfc
How do I delete the text that's between the ":" to get this:
Apple:apple
watermelon:kfc
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this community:
s with a single :
?Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to :.*?:
Set "Replace with" to :
Enable "Regular expression"
Click "Replace All"
Before:
Apple:123456789:pear
watermelon:57952161354:kfc
After:
Apple:pear
watermelon:kfc
:[^:]++:
would be much more efficient - but that only really matters if the text file is large. You could also try replacing :[^:]++(?=:)
with the empty string - but I'm not sure if notepad supports lookaround.
Nov 22, 2015 at 19:33