Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: help in reg...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 10969 of 11531
Post > Topic >>

Re: help in reg. exp.

by peng.kyo@[EMAIL PROTECTED] (J. Peng) Apr 21, 2008 at 08:05 PM

On Mon, Apr 21, 2008 at 7:17 PM,  <Irfan.Sayed@[EMAIL PROTECTED]
> wrote:
> Hi All,
>
>
>
>  I have string like OMS.FD.08.03.000.0 Now my req. is that if the string
>  contains .0 at the end then I want to remove that .0 but if any other
>  digit is there other than .0 then don't do anything.
>
>
>
>  For example: if string is : OMS.FD.08.03.000.0 then regular expression
>  should give OMS.FD.08.03.000
>

try:

$str =~ s/\.0$//;


-- 
J. Peng - QQMail Operation Team
eMail: peng.kyo@[EMAIL PROTECTED]
  AIM: JeffHua
 




 4 Posts in Topic:
help in reg. exp.
Irfan.Sayed@[EMAIL PROTEC  2008-04-21 16:47:02 
Re: help in reg. exp.
chas.owens@[EMAIL PROTECT  2008-04-21 07:24:15 
Re: help in reg. exp.
peng.kyo@[EMAIL PROTECTED  2008-04-21 20:05:22 
Re: help in reg. exp.
rob.dixon@[EMAIL PROTECTE  2008-04-21 19:40:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:07:14 CDT 2008.