I am working with the text of the 300 tang poems, which unfortunately is a single file containing both Chinese and English. Since I am interested in 'extracting' the English, I hope to use sed, grep,ortr to simply return all lines that contain Latin characters. So, for example, this text:051                 Seven-character-ancient-verseLi QiON HEARING AN WANSHAN PLAY THE REED-PIPEBamboo from the southern hills was used to make this pipe. And its music, that was introduced from Persia first of all, Has taken on new magic through later use in China. And now the Tartar from Liangzhou, blowing it for me, Drawing a sigh from whosoever hears it, Is bringing to a wanderer's eyes homesick tears.... Many like to listen; but few understand. To and fro at will there's a long wind flying, Dry mulberry-trees, old cypresses, trembling in its chill. There are nine baby phoenixes, outcrying one another; A dragon and a tiger spring up at the same moment; Then in a hundred waterfalls ten thousand songs of autumn Are suddenly changing to The Yuyang Lament; And when yellow clouds grow thin and the white sun darkens, They are changing still again to Spring in the Willow Trees. Like Imperial Garden flowers, brightening the eye with beauty, Are the high-hall candles we have lighted this cold night, And with every cup of wine goes another round of music.I would like a command that returns only the line 051, skips the Chinese, then returns the line 'seven character ancient verse' and everything following.
sed, grep, or tr command that returns only Latin characters from a UTF-8 file
grep;sed;regular expression;character encoding
Why not just:# grep -e [a-zA-Z0-9]\|^$ file.txt