How to replace all string between second and third occurance of pipe character using regex?
问题 I would like to replace all the characters occurring between second and third pipe character. Example: |hello|welcome,to| In this I want replace welcome,to with a blank value, with a huge file to be replaced. I need a regex pattern to be used in notepad++. 回答1: Assuming you're parsing each line, i.e. a token cannot include a newline: Find what: ^((?:[^|\n]*\|){2})[^|\n]*+\| Replace with: $1| Description ^ - matches the start of line ((?:[^|\n]*\|){2}) - matches and captures in group 1: (?:[^|