Hi ,
Use  the expression    /^G.*G$/

^ ----> Denotes the beginning of the line
$ -----> denotes ending of the line

if u dont want case sensitivity

use    /^G.*G$/i

i --> ignores case sensitivity

Arjun

Deserve before you desire







-----Original Message-----
From: April T.Barrett [ <mailto:[EMAIL PROTECTED]>
mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 13, 2005 3:49 AM
To: beginners@perl.org
Subject: Regular Expressions


Hello:



  I need some tips on going about regular expression:



parsing through a text file and printing all of the words that - for
example -

Begin and end with an "G"



Thanks.






--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] <
<http://learn.perl.org/> http://learn.perl.org/> <
<http://learn.perl.org/first-response>
http://learn.perl.org/first-response>







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Reply via email to