User: y135383 -- 2018-10-09 << 1423 1425 >> |
Hits: 2206 |
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 |