Find and Replace in Notepad++

Find : ^([^]]*])\s Replace : \1\t

  • ^ → start of the line
  • ([^]]*]) → capture everything up to and including the first ]
    • [^]]* = “any number of characters that are not ]”
    • then the first ]
  • \s → the space right after that ]
  • Replace with \1\t → the captured group (everything up to first ]) followed by a tab

Find : ([MIN-\d{4}])\s Replace : \1\t

  • (\[MIN-\d{4}\]) → captures [MIN-####] where #### is exactly 4 digits
  • \s → matches the space right after it
  • Replace with → \1\t → put back the captured [MIN-####] and replace the space with a tab

Remove [ and ] around [MIN-####]

Find : [MIN-(\d{4})] Replace : MIN-\1

  • \[MIN-(\d{4})\] → matches [MIN-2156]
    • \[ and \] → literal brackets
    • (\d{4}) → capture 4 digits
  • MIN-\1 → puts back the text without the brackets, using the captured digits

#notepad