From owner-freebsd-questions Fri Feb 9 1:44:41 2001 Delivered-To: freebsd-questions@freebsd.org Received: from osiris.ipform.ru (osiris.ipform.ru [212.158.165.98]) by hub.freebsd.org (Postfix) with ESMTP id AAC9537B4EC for ; Fri, 9 Feb 2001 01:44:20 -0800 (PST) Received: from wp2 (localhost.ipform.ru [127.0.0.1]) by osiris.ipform.ru (8.11.2/8.11.2) with SMTP id f199hGg10511; Fri, 9 Feb 2001 12:43:21 +0300 (MSK) (envelope-from matrix@ipform.ru) Message-ID: <001c01c0927c$be056b00$0c00a8c0@ipform.ru> From: "Artem Koutchine" To: "John Indra" , References: <20010209160849.A97806@office.naver.co.id> Subject: Re: Crafting Perl RE... Date: Fri, 9 Feb 2001 12:43:13 +0300 Organization: IP Form MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG try /(.*?)\.(\w+)$/ and use $2 ----- Original Message ----- From: "John Indra" To: Sent: Friday, February 09, 2001 12:08 PM Subject: Crafting Perl RE... > Hi... > > Simple question but I don't know the answer. Suppose I have this string: > somefile.ins.jpg. I want to craft a Perl RE so it captures the jpg part. I > try this RE: > > $string =~ m#\.(.*)$# > > Unfortunately $1 captures ins.jpg, not jpg as I want. > > What RE to get it right? > > Thanks... > > /john > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message