Dotaz

Honza Pazdziora adelton na informatics.muni.cz
Čtvrtek Červen 27 10:42:53 MEST 2002


On Thu, Jun 27, 2002 at 10:18:08AM +0200, David Olszyński wrote:
> 
> A nebo ponekud primocareji takto:
> 
> $_ = "1000000";
> while (s/(?<=\d)(...)( |\z)/ $1/) {1;}
> print;
> 
> Tento postup navic neudela zbytecnou mezeru v pripade cisla s poctem cifer 
> delitelnym tremi.

s/\B(?=(...)+(\.|,|$))/ /g;

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
      ... all of these signs saying sorry but we're closed ...
------------------------------------------------------------------------


Další informace o konferenci Perl