Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] [tlug-digest] re: searching for kanji strings, ignore punctuation and end of lines



Thomas said:
 >------
Since you have to do it with a one line perl script.
echo file.txt | perl -0777 -nle
's/((?:\np0001a0..00..)*[^\n]*A(?:\np0001a0..00..|\.)*B(?:\np0001a0..00..|\.)*C(?:\np0001a0..00..|\.)*D(?:\np0001a0..00..|\.)*E(?:\np0001a0..00..|\.)*F[^\n]*)/\n--start--\1\n--finish--/m;print'

will give you the lines bracketed by
--start--
p0001a05(00)-ghi.jklmn.op.rs.AB.
p0001a06(00)-CD.EFtuvw.xyz.
--finish--
->

Thanks. I will give something like this it a try.

And Josh, thanks for the suggestion about Safari, but that book is not 
exactly easy to read! I have been avoiding buying it for too long.

David







Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links