Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Delphi (http://www.programmingforums.org/forum41.html)
-   -   delphi text reading ..... (http://www.programmingforums.org/showthread.php?t=11896)

javo Nov 15th, 2006 1:37 PM

delphi text reading .....
 
hi everyone , i have a very very big problem for me in delphi , and i'd be happy if u can help me resolve it .
so I have this text file


:

first string
* second string : 43 ;
 third string :98 ;
*


so and i will assing this *txt file using
AssignFile(text , 'text.txt');
and i will have deffined string "first string" and on button click a text beween ** will assign to "first string" variable


so and my secon problem is that i have some word in the text , and i want to replace it with ***** if that word is for example f*ck

thanks for interest :)

javo Nov 16th, 2006 2:35 PM

ok so i resovled it this way,

:

var
  s: string;
begin
  s := 'first string { second string : 43 ; third string :98 ; }' ;
  Delete(s, 1, Pos('{', s));
  Delete(s, Pos('}', s), MaxInt);
  ShowMessage(s);
end;


but i want to ask if it is posibble to change
:

{
by
:

body{

thank you


All times are GMT -5. The time now is 1:34 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC