remove parts of textbox to special character

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

How can i remove ex.
Code: Select all
Hello: This is a test - And this is another test
How can i remove this part
Code: Select all
Hello: This is a test -
and leave
Code: Select all
And this is another test
so it deleted everything until the - comes in the textbox
https://t.me/pump_upp
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Code: Select all
Dim Length As Integer = TextBox1.Text.IndexOf("-")
TextBox1.Text = TextBox1.Text.Substring(Lenght + 1)
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

MrAksel wrote:
Code: Select all
Dim Length As Integer = TextBox1.Text.IndexOf("-")
TextBox1.Text = TextBox1.Text.Substring(Lenght + 1)
Thanks again, just what i was looking for cooll;
https://t.me/pump_upp
3 posts Page 1 of 1
Return to “Coding Help & Support”