Kalo gini gmana?
string ls_file, ls_tmp, ls_kata='tes', ls_ganti='cob'
integer li_file, li_count=0
li_file=FileOpen("TES.TXT", StreamMode!)
do; ls_file=ls_file+ls_tmp;
loop until FileRead(li_file, ls_tmp)<=0
FileClose(li_file)
do; yield();
li_count++; title=string(li_count) //-- JUST SHOW PROGRESS --//
ls_file=replace(ls_file, pos(ls_file, ls_kata), len(ls_kata), ls_ganti)
loop until pos(ls_file, ls_kata)=0
li_file=FileOpen("TES.TXT", StreamMode!, Write!, LockWrite!, Replace!)
do; yield()
FileWrite(li_file, ls_file)
ls_file=mid(ls_file, 32766, len(ls_file))
loop until len(ls_file)<=0
FileClose(li_file)
----- Original Message -----
From: "Syaiful Rojak" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 22, 2005 2:39 PM
Subject: Re: [indopb] Replace kata/kalimat dalam file teks
>
>
> terima kasih atas pendapat Mr. Uji frame. mungkin perlu saya jelaskan lagi
> bahwa saya ingin meng-replace isi pada
> sebuah file misal : test.txt di mana di dalam file teks tersebut terdapat
> banyak kata/kalimat yang ingin saya replace
> dengan kata/kalimat lain.
>
> contoh yang diberikan adalah untuk meng-replace sebuah string dan tidak bisa
> diterapkan
> dalam isi sebuah file.
>
> mungkin ada rekan-rekan indopb yang pernah mencobanya ?
>
> terima kasih.
-----------------------------------------------
INDOPB TURUT BERDUKA CITA UNTUK ACEH & SUMUT
-----------------------------------------------
IndoPB - Indonesia PB User Group
To Post a message, send it to: [EMAIL PROTECTED]
To Unsubscribe,send a blank message to: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indopb/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/