[EMAIL PROTECTED] wrote:
Hi All,
Hello,
I have string like this. D.PRS.WEB.02.10.001.1 and my requirement is that I want to remove last dot (.) and all the characters/digit after that dot with the help of regular expression.
$ perl -le' $_ = "D.PRS.WEB.02.10.001.1"; print; s/\.[^.]*\z//; print; ' D.PRS.WEB.02.10.001.1 D.PRS.WEB.02.10.001 John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/