🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.awk
Article #3

Re: How to use variables in regular expression?

#3
From: TANI Tadaaki,419,2277,
Date: Wed, 04 Nov 1992 01:51
32 lines
1478 bytes
$B!!Bg:eI\N)Bg3X$NC+$G$9!#(J

<3458@maxwell.drl.mei.co.jp>$B$N5-;v$K$*$$$F(J
hmitani@drl.mei.co.jp$B$5$s$O=q$-$^$7$?!#(J

> awk $B$N%9%/%j%W%H$rAH$s$G$$$k$N$G$9$,!"%Q%?!<%sFb$N@55,I=8=$NCf$G(J
> awk $B$NJQ?t$r;H$&J}K!$,$o$+$j$^$;$s!#(J

$B!!Nc$($PJQ?t(J P $B$K(J "abc" $B$H$$$&J8;zNs$,BeF~$5$l$F$$$k$H$7$F!"Bh#1%U%#(J
$B!<%k%I$N@hF,$,$=$N(J "abc" $B$G;O$^$C$F$$$k$b$N$K%^%C%A$5$;$k$K$O(J

	$1 ~ "^" P

$B$G=PMh$^$9!#(J

$B!!(J~ $B1i;;;R$N1&JU$O(J / $B$G64$^$l$F$$$J$/$F$b@55,I=8=$H2r<a$5$l$^$9$7!"(J
$BG$0U$N<0$r=q$/$3$H$,!J>e5-$NNc$G$OJ8;zNs$NO"@\!K$G$-$^$9!#(J

> awk '$1 ~ /^'$key'/' file | awk -f script

$B!!$3$N>l9g$G$9$H(J

	$1 ~ "^" $key

$B$G(J key $BHVL\$N%U%#!<%k%I$NJ8;zNs$,(J $1 $B$N@hF,$K4^$^$l$k$b$N$K%^%C%A$7(J
$B$^$9!#(J

$B!t$O$:$7$F$?$i$4$a$s$J$5$$!#(J

                  $BBg:eI\N)Bg3X9)3XItEE5$9)3X65<<Bh#89V:B!!!!!!C+!!CiL@(J
                                    tani@neptune.denki.osakafu-u.ac.jp
Technical Details
Message-ID: <5698@pisces.denki.osakafu-u.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!sh.wide!wnoc-kyo!icspub!uopgw!tani
References: <3458@maxwell.drl.mei.co.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!sh.wide!wnoc-kyo!icspub!uopgw!tani
From: tani@neptune.denki.osakafu-u.ac.jp (TANI Tadaaki,419,2277,)
Newsgroups: fj.lang.awk
Subject: Re: How to use variables in regular expression?
Message-ID: <5698@pisces.denki.osakafu-u.ac.jp>
Date: 4 Nov 92 01:51:42 GMT
References: <3458@maxwell.drl.mei.co.jp>
Sender: news@neptune.denki.osakafu-u.ac.jp
Distribution: fj
Organization: College of Engineering, University of Osaka Prefecture, JAPAN
Lines: 32