 |

10-26-2006, 04:42 AM
|
|
Newcomer
|
|
Join Date: Oct 2006
Posts: 4
|
|
Possible
|
Hi Everone
Right heres my idea:
Bascially I want to build a small app, which replaces ceratin words in artices, on the interface there will be two rtbs and a generate button, what I want to be able to do is something like this
I paste the article in one of the rtb and for example if the word 'is' appears in the article, it should be replaced with 'be'. For the programming side of it, im wondering if i could use if statements
e.g. if is appear, then
replace 'if' with 'be
if anyone knows code that would do this, please post it, It would be appriciated 
|
|

10-26-2006, 07:09 AM
|
 |
Keeper of foo
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
|
|
__________________
~ Quod non mortiferum, fortiorem me facit ~
Avatar by lebb
|

10-26-2006, 08:33 AM
|
 |
Contributor
|
|
Join Date: Oct 2003
Location: Nebraska, USA
Posts: 640
|
|
something like this
Code:
RichTextBox1.Text = Replace$(RichTextBox1.Text, "is", "be", 1, -1)
If you have a lot of words you need to change, you could get some kind of loop happening and use variables like
Code:
RichTextBox1.Text = Replace$(RichTextBox1.Text, strWord_to_replace, strReplacement_word, 1, -1)
|
|

10-27-2006, 01:33 PM
|
|
Newcomer
|
|
Join Date: Oct 2006
Posts: 4
|
|
|
Thanks for info, works perfectly, however there is a little problem
say I have have set the word 'be' to be replaced with, 'let'
So if an article has words such as because or began in, it still replaces the 'be' bit so its looks like 'letcause' or 'letgan'
any ideas how to fix it?
|
|

10-27-2006, 01:37 PM
|
 |
Contributor
|
|
Join Date: Oct 2003
Location: Nebraska, USA
Posts: 640
|
|
|
replace on " be "
assuming there'll be a space in between the words seems the simplest method
course, you'll be knackered if there's a comma or period
|
|

10-27-2006, 01:59 PM
|
|
Newcomer
|
|
Join Date: Oct 2006
Posts: 4
|
|
|
yeah good, idea, anyway ill just proof read afterwards to correct little mistakes, thanks
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|