Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Visual Basic Help


ghost's Avatar
0 0

Anyone know how to remove all of one character? For example if I want to removell dots?

I've tried… markuppol = pol.Replace(".", "")

And it doesn't work :(


richohealey's Avatar
Python Ninja
0 0

lol weren't you learning python a while back?

and nah sorry, i'm really not very familiar with VB.

you could loop recursively through the string and only add characters that aren't . to a new string. in python it'd look like

string1 = "this.is.a.string.with.dots.in.it" string2 = "" for i in string1: [tb]if i != ".": [tb][tb]string2 += i print string2

EDIT: Gah it even deformats big lots of spaces. i'll put [tb] where there should have been tabs.


ghost's Avatar
0 0

DarkPanther_ wrote: Anyone know how to remove all of one character? For example if I want to removell dots?

I've tried… markuppol = pol.Replace(".", "")

And it doesn't work :(

Dude, it is not so simple. You need to make a loop. It is not simple.


ghost's Avatar
0 0

Yeah :P

I do 'em in a mix… I know the basics of Python, C++, VB.NET, PHP, HTML and Javascript.

And hmm… I think I know what you mean… I'll try what I think it would be in vb…


ghost's Avatar
0 0

Yeah… SsAgEnT your way worked… I also realised I had a big error…. :P