Mario,

Sure there is a better way, but

with

s/(\w+)\./$1_/g # All dots to underscores

you get

abc_def_ghi_jkl_mno

then, with

s/_(\w[^_]+)$/_\.$1/ # the last underscore to "_."

you get

abc_def_ghi_jkl_.mno



Antonio

El 27-may-04, a las 13:49, mario sanchez escribió:

help for a novice (going crazy)

i cant seem to find the sequence to substitute all "." with "_" EXCEPT for
the last one

ex. change abc.def.ghi.jkl.mno
to abc_def_ghi_jkl_.mno

any help or pointers please?
thank you
mario

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to