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:
The final screening meets the requirements as follows:
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:
After querying, copy the selected information. The operation is as follows:
Contents after copying:
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:
the content after final processing is as follows:
2. Add a comma after each line
The format of the original file is as follows:
you need to add a comma after each line, the operation screenshot is as follows:
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:
after the newline:
Supplement: 4. Remove the <> in all lines (there cannot be nested <>)
Example content:
Processing method: