I need to delete all lines from a file containing a match for read (symbol), where (symbol) is any CJK character. In matches were read (symbol) is immediately preceded by A-Z or a-z, however, then the line should not be deleted. E.g., here are some sample lines and results:
Do you like to read books? (not deleted)
Can you read 书? ( deleted)
.read 书. (deleted)
This is some thread 线. (not deleted)
How can I delete only those lines matching (not A-Z or a-z)read (CJK symbol)?
I’m not entirely sure how to match CJK characters, but if you match non-ASCII characters you may achieve the results you’re looking for:
Theoretically, you should be able to do:
However in my testing, I get error:
http://en.wikipedia.org/wiki/List_of_Unicode_characters#CJK_unified_ideographs
EDIT:
Results:
Also see:
How to delete all CJK text appearing immediately after a particular symbol?