473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Replacing characters

Hi

How can I replace characters like carriage return and double quotes from
strings?

Thanks

Regards
Nov 13 '05 #1
4 2485

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:41*********************@news-text.dial.pipex.com...
Hi

How can I replace characters like carriage return and double quotes from
strings?

Thanks

Regards


The Replace function will do that.
Nov 13 '05 #2
Be careful of using it in a query before A2K2, though.

"Randy Harris" <ra***@SpamFree.com> wrote in message
news:AI*******************@newssvr33.news.prodigy. com...

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:41*********************@news-text.dial.pipex.com...
Hi

How can I replace characters like carriage return and double quotes from
strings?

Thanks

Regards


The Replace function will do that.

Nov 13 '05 #3
> How can I replace characters like carriage return and double quotes from
strings?


You need to use VB. Like somevalue = replace(somevalue, vbcr, "").
I'm not sure which characters have enums or not, so you can also use
the chr(34) function for example to get a quote. ( Because you can't
say """ )
Nov 13 '05 #4
"John" <Jo**@nospam.infovis.co.uk> wrote in message news:<41*********************@news-text.dial.pipex.com>...
How can I replace characters like carriage return and double quotes from
strings?

In Access 2000 and newer use the Replace() function.

Carriage returns can be referenced as vbCr but more likely you want to
deal with Window's CrLf pair so you should use the vbCrLf constant to
remove new line/line breaks:

sUpdatedString = Replace(sSomeString, vbCrlf, "")

here replacing a hex \0x13, \0x10 pair (CR-LF) with an empty string.

'---------------
' John Mishefske
'---------------
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Xah Lee | last post by:
i have a bunch of java files that has spaced-out formatting that i want to get rid of. I want to replace two end of line characters by one end of line characters. The files in question is unix, and...
7
by: VMI | last post by:
If I have the string "Héllo", how can I replace char (é) with an 'e'? I cannot use the String.Replace() fuction. It has to be by replacing one char with another. Thanks.
12
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: ...
0
by: leeonions | last post by:
Hi there, i am trying to use regular expressions to search through a text string and replace a given whole word. take the string = "The matsat on the mat!" (bad example i know) i want to...
2
by: Alain | last post by:
Hi, I am working on a project where I need to convert international characters with acii values. Like André -> andre and Björn -> bjorn. How can I do this without replacing every single...
14
by: Adnan Siddiqi | last post by:
Hi Suppose I have following URLs comming from an HTML document <a href="http://mydomain1.com">Domain1</a> <a...
2
by: David | last post by:
Sent this to alt.php a couple of days back, but doesn't look like I'll get an answer, so trying here. I'm trying to convert a script to use friendly URLs, I've done this before, but my PHP...
4
by: Trev | last post by:
Hi everyone, I'm having some problems using Regex; I have a long string that is delimetered in a random fashion by a combination of spaces and \n's for newlines. I have five possiblities: //...
2
by: gsuns82 | last post by:
Hi all, I have to replace accented characters from a input string with normal plain text.I have coded as follows. String input = "ÄÀÁÂÃ"; input=...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.