Article View: comp.lang.perl.misc
Article #324Re: How to search ******
From: Tom Phoenix
Date: Tue, 15 Jul 1997 00:00
Date: Tue, 15 Jul 1997 00:00
25 lines
1414 bytes
1414 bytes
On Tue, 15 Jul 1997, Chao Shao-ju wrote:
> I tried to search a line that contains more than one star (*) , using:
>
> if ($line =~ /\*\*/)
> {
> ................
> }
>
> But it does not work.
Well, you're searching there for two stars. When you say it doesn't work,
what do you mean? Do you mean that it fails to match when you think it
should? It works for me:
$line = 'this line has two ** stars';
if ($line =~ /\*\*/) { print "Yep\n" }
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Technical Details
Message-ID:
<Pine.GSO.3.96.970715072357.20153I-100000@kelly.teleport.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<33CAFAC4.2013B7C3@csc.albany.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1133f4,b92671e9260cc62 X-Google-Attributes: gid1133f4,public X-Google-Thread: fa0ae,b92671e9260cc62 X-Google-Attributes: gidfa0ae,public X-Google-Thread: 112333,b92671e9260cc62 X-Google-Attributes: gid112333,public From: Tom Phoenix <rootbeer@teleport.com> Subject: Re: How to search ****** Date: 1997/07/15 Message-ID: <Pine.GSO.3.96.970715072357.20153I-100000@kelly.teleport.com> X-Deja-AN: 256996893 References: <33CAFAC4.2013B7C3@csc.albany.edu> To: Chao Shao-ju <sc7489@csc.albany.edu> Organization: Society for the Elimination of Unwarranted Excess Superfluous Text in Internet Header Lines Newsgroups: comp.lang.perl.misc,de.comp.lang.perl,fr.comp.lang.perl