We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

replace ()

thenone
thenone asked
on
Medium Priority
397 Views
Last Modified: 2010-04-07
How could you use vb replace function to replace anscii special characters?
Comment
Watch Question

Top Expert 2005
Commented:
you need to know anscii code

replace("Yourstring",Chr(34),"a")

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
GrahamSkanRetired
CERTIFIED EXPERT
Top Expert 2012
Commented:
Replace (strExample, chr$(ancsiiNumber), srtWhatever)
GrahamSkanRetired
CERTIFIED EXPERT
Top Expert 2012

Commented:
Oops. Sorry dmirty, cross-posted (again)

Author

Commented:
which number is it dec,hex or html number
CERTIFIED EXPERT
Commented:

Author

Commented:
What if its a hexa decimal number for example upside down ? mark
Harisha M GEngineer
CERTIFIED EXPERT
Commented:
CERTIFIED EXPERT
Commented:
Engineer
CERTIFIED EXPERT
Commented:
More info on ASCII: http://en.wikipedia.org/wiki/ASCII

To replace ¿ to, say, "Inverted ?" use

yourstr = Replace(yourstr,Chr(191),"Inverted ?")

or if you want "Inverted ?" to be changed to ¿ then use

yourstr = Replace(yourstr,"Inverted ?",Chr(191))

Note that you can also use "¿"  or Chr(H191) instead of Chr(191)

Author

Commented:
what is the special character code for  € I can't find it anywhere.

Also how can i replace s sequence for exmple (1) to (100000) is this possible?
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2013
Commented:
You can use an ascii chart, or use this to find the ascii value of any character:

asc("€")

(in this case the value is 128)

Harisha M GEngineer
CERTIFIED EXPERT

Commented:
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.