Can anyone tell me if it is possible to perform a search and replace inside
of a string?

I have a string called myData that contains an emdash that I need to change
into a hyphen and I cannot find a way to do this.

Any assistance would be greatly appreciated.

Thank you for taking them time to read this.

Re: Search and Replace in String by Vince

Vince
Mon Jan 31 22:53:51 CST 2005

myData=Replace(myData,chr(40),"-")

OR
myData=Replace(myData,"¾","-")

Is this what you want?

Vince

"Eternally grateful" <Eternally grateful@discussions.microsoft.com> wrote in
message news:1D3B6AAD-28BA-4C32-A474-A934B6C114E0@microsoft.com...
> Can anyone tell me if it is possible to perform a search and replace
inside
> of a string?
>
> I have a string called myData that contains an emdash that I need to
change
> into a hyphen and I cannot find a way to do this.
>
> Any assistance would be greatly appreciated.
>
> Thank you for taking them time to read this.



Re: Search and Replace in String by Vince

Vince
Tue Feb 01 00:03:15 CST 2005

Sorry, I meant emdash (the symbol) there. Not 3/4. Using the ASCII should
work
"Vince" <sdsad@fsd.com> wrote in message
news:uU2pIoBCFHA.244@TK2MSFTNGP10.phx.gbl...
> myData=Replace(myData,chr(40),"-")
>
> OR
> myData=Replace(myData,"¾","-")
>
> Is this what you want?
>
> Vince
>
> "Eternally grateful" <Eternally grateful@discussions.microsoft.com> wrote
in
> message news:1D3B6AAD-28BA-4C32-A474-A934B6C114E0@microsoft.com...
> > Can anyone tell me if it is possible to perform a search and replace
> inside
> > of a string?
> >
> > I have a string called myData that contains an emdash that I need to
> change
> > into a hyphen and I cannot find a way to do this.
> >
> > Any assistance would be greatly appreciated.
> >
> > Thank you for taking them time to read this.
>
>



Re: Search and Replace in String by Jezebel

Jezebel
Tue Feb 01 00:05:38 CST 2005

em-dash is chr(150)

BTW, the string versions of these functions are about 10 times faster than
the variant equivalents --

MyData = Replace$(OldData, chr$(150), "-")




"Vince" <sdsad@fsd.com> wrote in message
news:uU2pIoBCFHA.244@TK2MSFTNGP10.phx.gbl...
> myData=Replace(myData,chr(40),"-")
>
> OR
> myData=Replace(myData,"¾","-")
>
> Is this what you want?
>
> Vince
>
> "Eternally grateful" <Eternally grateful@discussions.microsoft.com> wrote
> in
> message news:1D3B6AAD-28BA-4C32-A474-A934B6C114E0@microsoft.com...
>> Can anyone tell me if it is possible to perform a search and replace
> inside
>> of a string?
>>
>> I have a string called myData that contains an emdash that I need to
> change
>> into a hyphen and I cannot find a way to do this.
>>
>> Any assistance would be greatly appreciated.
>>
>> Thank you for taking them time to read this.
>
>