Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!jindai-news!cc-jindai-news!news
From: hiro@cc.kanagawa-u.ac.jp (Hiroyuki Satoh)
Subject: Re: How to search Japanese with Perl
In-Reply-To: aeg@agusa.nuie.nagoya-u.ac.jp's message of 14 Feb 1997 19:01:32 +0900
Message-ID: <prbu9db7ql.fsf@orange.cc.kanagawa-u.ac.jp>
Lines: 28
Sender: hiro@orange.cc.kanagawa-u.ac.jp
Organization: IPC, Kanagawa Univ. Yokohama, Japan
X-Newsreader: Gnus v5.0.6
References: <prybcs6na9.fsf@fondu.cc.kanagawa-u.ac.jp>
	<v8iybcrvh8i.fsf@uruka.agusa.nuie.nagoya-u.ac.jp>
Date: Sat, 22 Feb 1997 07:49:38 GMT
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:1757
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=1757&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.


>> On 14 Feb 1997 19:01:32 +0900, aeg@agusa.nuie.nagoya-u.ac.jp (Eiji Ito) said:
In article <v8iybcrvh8i.fsf@uruka.agusa.nuie.nagoya-u.ac.jp> aeg@agusa.nuie.nagoya-u.ac.jp (Eiji Ito) writes:


> A.E.G.$B$3$H0KF#1QFs$G$9!%(B
$B:4F#(B@$B?@F`@nBg3X$G$9(B

> $B$A$g$C$H$7$?%W%m%0%i%`$r=q$$$F$_$^$7$?!%$3$N$h$&$K$9$l$P!$F|K\8l(BEUC
> $B$N%3!<%I$J$i$-$A$s$H%^%C%A$9$k$H;W$$$^$9!%(BEUC $B$N(B 2byte$B%3!<%I$N8e$KE,(B
> $BEv$JJ8;z(B($B%;%Q%l!<%?(B)$B$rF~$l$F!$8e$+$i>C$7$F$$$^$9!%(B($B$+$C$3$o$k!A(B)

> ===================== $B$3$3$+$i(B (jpmatch.pl) ====================
> #!/usr/local/bin/perl

> $query_word = '$B8$(B'; &addSepEUC(*query_word);

> while(<>){ &addSepEUC(*_); if(/$query_word/){ &delSepEUC(*_); print;
> } } exit 0;

> sub addSepEUC{ local(*_) = @_; s/([\241-\376][\241-\376])/$1$;/g; }

> sub delSepEUC{ local(*_) = @_; s/([\241-\376][\241-\376])$;/$1/g; }

$B$3$l$G;W$$$I$*$j$N;v$r9T$&;v$,=PMh$^$7$?!#(B
$B$I$&$b$"$j$,$H$&$4$6$$$^$9!#(B


-- 
------------------------------------
Hiroyuki Satoh 
hiro@cc.kanagawa-u.ac.jp
dept: economics. kanagawa univ.
------------------------------------

