Ken,
As usual, you always come to the aid of others. Thanks! This seems to work
great!
-Dan
Here's a replacement function - it's a little messy (because I have to
wrap 'whatText' in spaces at the beginning and strip them at the end),
but it works:
Subject: RE: Search and Replace
Ken,
As usual, you always come to the aid of others. Thanks!
This seems to work great!
-Dan
Here's a replacement function - it's a little messy
(because I have
to wrap 'whatText' in spaces at the beginning and strip them at the
end
he him himself his he's boy guy He Him Himself His He's Boy Guy
I get:
he her herself her she's girl gal He Him Himself His He's Boy Guy
There seems to be a problem if a replaceable word is the
first word of a sentence, and obviously, capitalization seems
to be an issue.
Below is
On Wednesday, Oct 16, 2002, at 08:41 Australia/Sydney, Dan Friedman
wrote:
Greetings!
I need to switch the gender of some text. But, I'm having a hard time
figuring out a way to do it. Obviously I can't do a simple replace
because
Replace HE with SHE in someText
Would turn HELP
In this case can you not consider spaces to be part of the 'word' ? In which
case a direct replace would work.
ie HE - SHE
HIS - HER
This would avoid HELP - SHELP and THIS - THER
Regards
Gary Rathbone BSc MBCS
Chartered Information Systems Practioner
-Original Message-
From:
Gary,
Yes, but I can't assume the pronouns will be ONLY in the middle of a
sentence. Searching for He will not work in He is a good boy.
or Him in We like Him.
In this case can you not consider spaces to be part of the 'word' ? In which
case a direct replace would work.
ie HE - SHE
On Wednesday, Oct 16, 2002, at 08:41 Australia/Sydney, Dan Friedman
wrote:
Greetings!
I need to switch the gender of some text. But, I'm having a hard time
figuring out a way to do it. Obviously I can't do a simple replace
because
Replace HE with SHE in someText
Would turn
, 2002 9:58 PM
Subject: Re: Search and Replace
Ken,
I can't get [your] function to work. It never exits out of the repeat.
Although the matchChunk does return true, the tStart and tEnd variables
are
never being filled with anything. What am I doing wrong?
(Please excuse my ignorance in regards
Sorry, Dan, it looks like a typo. This line:
put char tStart to tEnd of tText into tFoundChunk
should read:
put char tStart to tEnd of whatText into tFoundChunk
Then everything should work OK. Sorry about that...
Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web