Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8822383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:05:45+00:00 2026-06-14T06:05:45+00:00

I am trying to parse junk and narrow down a bunch of text. How

  • 0

I am trying to parse junk and narrow down a bunch of text. How do I delete the current line if a does not match? I would like to remove the line entirely:

For i As Integer = 0 To RichTextBox1.Lines.Length - 1
  Dim a As String = RichTextBox1.Lines(i).ToString
  If Not a = "SaveThisLine" Then
    'delete the active line
  End If
Next

Also how would I match partially? Such as if not a = "SaveThisLine" & * (to use a wildcard).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:05:46+00:00Added an answer on June 14, 2026 at 6:05 am

    I would not touch original text and rather save valid lines into a StringBuilder, so if line is valid, AppendLine to it. In the end dump back into RichTextBox1.Text using StringBuilder.ToString.

    For partial match in VB.NET you can use a native Like operator:

    "aaa" Like "a*"
    

    Returns True.

    Or use regular expressions:

    System.Text.RegularExpressions.Regex.Match("aaa", "^a").Success
    

    Also returns True.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to parse xml to text I got something like this, INPUT FILE <Item
Trying to parse an HTML document and extract some elements (any links to text
I am trying to parse XML with Python but not getting very far. I
Im trying to parse some items in a listview and when I scroll down
I am trying parse out some text that is in an html file. The
I am trying parse the ESPN bottom line feed using RegEx but am coming
Trying to parse an nested expressions like GroupParser.parse({{a}{{c}{d}}}) After many hours i have now
Im trying to parse some html code line by line. However, when i search
Im trying to parse info from ifconfig (ubuntu). Normally, I would split a chunk
I'm trying parse a html form that looks like that: <select name=country> <option value=1>Afghanistan</option>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.