notepad++ query specified content and copy

Background Note

Record the relevant scenes of using notepad to search and replace text content. Simple records are convenient for later viewing. The content of the scene:
     1. Filter out all the personnel id sets from the specified given content
     2. Add a comma after each line
     to add: 3 . Change the line according to the specified content
     Supplement: 4. Remove the <> in all lines (there cannot be nested <>)

1. Filter out all the personnel id sets from the specified given content

    It is required to filter out all the personnel id sets from the specified given content.
The given content is as follows:
insert image description here

     The final screening meets the requirements as follows:
insert image description here

It is required to query all of the text content

"memberId":"数字,

Information. You can first use the regular query to find out all the content that meets the conditions. The regular expression is as follows:

"memberId":"([0-9]+)

     The screenshot of the operation is as follows:
     insert image description here
     After querying, copy the selected information. The operation is as follows:
     insert image description here
     Contents after copying:
insert image description here

     The content after copying is intercepted as content that conforms to the format (that is, it will be "memberId":removed). The screenshot of the operation is as follows:
insert image description here
     the content after final processing is as follows:
insert image description here

2. Add a comma after each line

     The format of the original file is as follows:
insert image description here
     you need to add a comma after each line, the operation screenshot is as follows:
insert image description here

Supplement: 3. Change the line according to the specified content

     A piece of text has been copied, and line breaks are required according to the comma. Example content:

The provincial administrative regions of the People's Republic of China refer to China's current 34 first-level administrative regions, including 23 provinces (Hebei, Shanxi, Heilongjiang, Jilin, Liaoning, Jiangsu, Zhejiang, Anhui, Fujian, Jiangxi, Shandong, Henan, Hubei, Hunan, Guangdong, Hainan, Sichuan, Guizhou, Yunnan, Shaanxi, Gansu, Qinghai, Taiwan), 5 autonomous regions (Inner Mongolia, Guangxi, Tibet, Ningxia, Xinjiang), 4 municipalities directly under the Central Government (Beijing, Tianjin, Shanghai, Chongqing), 2 special Administrative Region (Hong Kong, Macau)

     Newline method:
insert image description here
     after the newline:insert image description here

Supplement: 4. Remove the <> in all lines (there cannot be nested <>)

     Example content: insert image description here
     Processing method:
insert image description here

Guess you like

Origin blog.csdn.net/weixin_43401380/article/details/130889771