Regex Notepad++ find & replace 2nd set of characte

2019-08-21 10:42发布

问题:

i have a line of text like

CK \t Segamat \t Johor \t 999

assume the \t is a tab, how can i replace the 2nd \t with a space?

so far i can find the line with 3 \t = ^(.*?\t.*?)(.*?\t.*?)\t

回答1:

Find & capture what is between tabs in the find field:

^(.*?)\t(.*?)\t(.*?)\t(.*?)$

Then replace the tabs between the captured groups in the replace-with field using a space where you want it substituted:

\1\t\2 \3\t\4