Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format output database

Status
Not open for further replies.

Bartzilla

Technical User
Jul 16, 2004
15
DE
A while ago I posted a message about pulling data from an Access database. I wanted to know how to pull this data from the db in a way that shows the breaks and things like that. Someone suggested to use a 'replace' function. Now, that would work for just an enter or whatever, but isn't there some function that catches everything? It would be impossible to use a 'replace' for every possible character. I need this for asp. I read somehwere that you can do this in php with just one line of code.
Thanks!

Bartzilla
 
Hi Chris,

I am not replacing several characters with one.
I only meant that I need to make sure not just the 'enters' get pulled from the db correctly, but also 'shift enters' and things like that. What would be the easiest way to do that?
Thanks,

Bartzilla
 
by several characters I don't mean like a word replace

eg:
you want to replace all instance of " & ' with "
Code:
function ReplaceQuotes(strIn)
' function to replace " & ' in a string
	dim RegEx
	set RegEx = New RegExp
	RegEx.Pattern = "['" & chr(34) & "]"
	RegEx.Global = True
	ReplaceQuotes = RegEx.replace(strIn, """)
	set regEx = nothing
end function

what exactly is a "shift enter"?





Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top