I have some long strings of Chinese characters, but for the sake of the question, let's suppose they are:
啊爱好情人心安静排全装按照八把握爸吧白菜酒色夭百班长板
and
阿姨啊挨打矮小爱国护安检慰置岸边上按摩时案子暗示巴士拔
The first string lists all of the "easy" Chinese characters. The second string lists all "easy" and "intermediate" Chinese characters, but I only want the "intermediate" Chinese characters: I want to delete the "easy" characters from the second string.
E.g. after editing, the second string will not contain 啊 nor 爱 (and perhaps more deletions) since they both occur in the first string.
Question: How do I remove Chinese characters from string B whenever they occur in string A, while preserving the order?
I feel like this should be solvable with awk
or sed
or something; I don't mind. It looks like I could convert these strings to two text files, and use any one of the commands in How to remove the lines which appear on file B from another file A? However, I'd rather do it without creating auxiliary files.
It's also important to retain the order of the characters in the strings.