Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1424.Text file parser -- How to find sentences that match Chinese(UTF-8 encoding) characters?

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


Similar Examples:
How to split English sentence and Chinese sentence into different lines? (52%)
How to bulk remove Chinese characters? (52%)
How to batch replace lines that has less than 10 characters? (51%)
How to find files with specified encoding and convert to utf8? (50%)
How to extract sentences that contain specified words from UTF8 file? (49%)
How to extract all sentences that contain specified words? (48%)
How to extract all lines that has no leading spaces? (47%)
How to batch replace text that contains special characters like $,{,} ? (47%)

Check Demo of Text file parser
Keywords:
chinese  bold  chin  sentences  utf 8 encoding  utf 8  grep  utf  sentence  two files  advanced find and replace sentence  find a files encoding  replace words in a sentence  encoding test  find words in files  words that replace join  join two files  find 2 words