| View previous topic :: View next topic |
| Author |
Message |
badcoder Guest
|
Posted: Sat Feb 26, 2005 5:08 pm Post subject: search and replace |
|
|
Hi!
I want to search and replace different words in a text.
For example:
Check text file for 'text'
replace 'text' by 'bits'
and so on...
What have I to do? |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Sat Feb 26, 2005 5:24 pm Post subject: |
|
|
Have a look at StringReplace
If you are replacing a string from a text file have a look at Loop (Read Files and folders) as well.
Last edited by Jon on Sat Feb 26, 2005 6:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sat Feb 26, 2005 5:34 pm Post subject: |
|
|
Also, almost every editor other than Notepad offers this simple functionality.  |
|
| Back to top |
|
 |
badcoder Guest
|
Posted: Sat Feb 26, 2005 6:05 pm Post subject: |
|
|
Sorry.. I don't understand it.
Can you give me an example for search and replace, please. |
|
| Back to top |
|
 |
ranomore
Joined: 06 Nov 2004 Posts: 178 Location: Salt Lake City, UT
|
Posted: Sat Feb 26, 2005 8:28 pm Post subject: |
|
|
| Documentation wrote: | | StringReplace, OutputVar, InputVar, SearchText , ReplaceText , ReplaceAll |
| Code: |
#j:: ;Windows+J
InputVar = Text
StringReplace,OutputVar,InputVar,text,bits
msgbox, %OutputVar%
return |
|
|
| Back to top |
|
 |
exhueydriver
Joined: 12 Jul 2004 Posts: 51 Location: Fife,Wa
|
Posted: Sun Feb 27, 2005 4:18 am Post subject: |
|
|
| jonny wrote: | Also, almost every editor other than Notepad offers this simple functionality.  |
I must have a different version of Notepad, 'cause Find & Replace is there.
Don |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sun Feb 27, 2005 4:29 am Post subject: |
|
|
*smacks head*
I have a good excuse for overlooking it - I'm crippled by an insurmountable bias against any company that starts with micro and ends with soft. I could still name quite a few reasons why I prefer editor² over notepad. |
|
| Back to top |
|
 |
|