Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2002 08:56:47 +0700
From:      "ekoz" <ekoz@melsa.net.id>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   perl question
Message-ID:  <001c01c1cee9$54b626d0$d4e18aca@melsa.net.id>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi All,

I have a little problem with perl. I try to delete a few line in a file with perl. I have a following line :

cs
cs.tpkkoja

I use "s/\bcs\b/ /;" to deleting the word "cs" and i don't want to deleting  "cs.tpkkoja" but, i get this result :

     .tpkkoja
all the word "cs" is deleted include in "cs.tpkkoja".
Any Suggestions ?

________________________________
 Eko Suwarsono
 ekoz@melsa.net.id

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi All,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have a little problem with perl. I try to delete 
a few line in a file with perl. I have a following&nbsp;line :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>cs</FONT></DIV>
<DIV><FONT face=Arial size=2>cs.tpkkoja</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I use "s/\bcs\b/ /;" to&nbsp;deleting the word "cs" 
and i don't want to deleting&nbsp; "cs.tpkkoja"&nbsp;but, i get this result 
:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp; .tpkkoja</FONT></DIV>
<DIV><FONT face=Arial size=2>all the word "cs" is deleted include in 
"cs.tpkkoja".</FONT></DIV>
<DIV><FONT face=Arial size=2>Any Suggestions ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>________________________________<BR>&nbsp;Eko 
Suwarsono<BR>&nbsp;<A 
href="mailto:ekoz@melsa.net.id">ekoz@melsa.net.id</A></FONT></DIV></BODY></HTML>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001c01c1cee9$54b626d0$d4e18aca>