User: y135383 -- 2018-10-09 << 1423 1425 >> |
Hits: 1211 |
Type: Text file parser |
Search all Text file parser examples |
Description: |
How to find sentences that match Chinese(UTF-8 encoding) characters? I have two files, a file is a sentence. b files are words. I want to find out all the sentences containing the b-file words and show them in bold. |
Input Sample: |
a.txt 在惨痛中反省。 惨痛的教训 乐于帮助。 我非常乐于干活。 b.txt 惨痛 乐于 |
Output Sample: |
惨痛 在<b>惨痛</b>中反省。 <b>惨痛</b>的教训 乐于 <b>乐于</b>帮助。 我非常<b>乐于</b>干活。 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Put a.txt in d:\test\ folder 1. ctrl-o open b.txt 2. ctrl-h open replace dialog * set 'search for pattern' to: * set 'replace with pattern' to: * click 'advanced' tab, set 'run following at the begin...' to: 3. click 'replace', done. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |