Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have too many records which ending as below :

en-US|||||

But i wanted them to be replace to new line let say

en-US

newline

Note text en and US are different in each records, the only item needed to be kept is "-". Please advise.

share|improve this question
    
What have you tried so far? –  Daniel Beck Sep 14 '12 at 5:32
    
The only thing method i tried is replace with : \n. What do i have to input in "Find What : xx-xx||||" ? –  Kenneth Lhv Sep 14 '12 at 5:34
add comment

2 Answers 2

up vote 6 down vote accepted
  1. Press Ctrl+H (Find & Replace).

  2. Use those settings:

    • Search mode: Extended

    • Find what: |||||

    • Replace with: \n

  3. Replace.

share|improve this answer
add comment

User regular expression to find [a-zA-Z][a-zA-Z]-[a-zA-Z][a-zA-Z]|||| and replace \n

in Notepad++ 6, PCRE (Perl Compatible Regular Expressions) is supported. Here is Ref.

We should also referece another stackoverflow question. Notepad++ newline in regex

share|improve this answer
    
Thanks swemon! Worked like a spell! –  Kenneth Lhv Sep 14 '12 at 6:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.