Re: lug-bg: modifikacia na sring
- Subject: Re: lug-bg: modifikacia na sring
- From: kleo@xxxxxxxxxxx (Kliment Ognianov)
- Date: Fri, 07 Feb 2003 16:43:20 +0200
Kliment Ognianov wrote:
> Konstantin Ivanov wrote:
>
>>A kak moje da se zamestiat podobni stringove vyv fail izpolzvaiki tozi perl podhod, s "tr" ne se poluchava
>>
#!/usr/bin/perl v na4aloto , fcoz :)
> use strict;
> my @f;
> open(IN,"<+" . <path/filename>);
<+ - 4ete6 i rewrite-vash faila
> while(<IN>)
> {
> s/(\d+)-(\d+)-(\d+)/20$3-$2-$1/gi;
ili \d{2} vmesto \d+, no ne e korektno, btw moje i bez 'i' nakraq, ne se
express-vat strings ....
> push(@f,$_);
> }
> print IN join('',@f);
> close(IN);
--
The Power to Serve! <http://www.freebsd.org>
.....................................
: Kliment Ognianov :
: Network Administrator & Developer :
: BulInfo Networks Department :
:...................................:
: http://www.bulinfo.net/ :
:...................................:
: +(359)-2-9699165,+(359)-88-670051 :
: ICQ #16864572, #64866894 :
:...................................:
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|