Regularni vyrazy
Honza Pazdziora
adelton na informatics.muni.cz
Pondělí Říjen 14 16:24:49 MEST 2002
On Mon, Oct 14, 2002 at 04:22:19PM +0200, Jiri Polcar wrote:
>
> 1> $text = "x 12.223,3349 x";
> 2> $text =~ s|([0-9]([0-9])?(\.([0-9][0-9][0-9]))*(,[0-9]+)*)|$a = $1;
> 3> $a =~ s/\.//g;
> 4> $a|eg;
> 5> print "$text\n"
>
> Mohl by by nekdo vysvetlit, jak to, ze TO funguje? Nerozumim radku 1 a
> 4, v zivote jsem to nevidel (nemam namysli ten RE). Kde to najdu v manu?
Radek 1 je naprosto normalni prirazeni retezce. A radek 4 je konec
substituce, ktera zacina na radku 2. Muzete upresnit, co se Vam
nepozdava?
--
------------------------------------------------------------------------
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