EDN Admin
Well-known member
okay .
I am here with a problem and the problem is that i wish to find out a string in a big text like this :
______________________________________________________________________________
Like if i wanted to find the word <span style="text-decoration:underline string and compare a <span style="text-decoration:underline string to the other
<span style="text-decoration:underline string in this sentence.
______________________________________________________________________________
The program then sees if there is the word string then program will look at it to find the word or the string using IF() statement then make a text box saying : The word was found .
<pre class="prettyprint" style=" using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace Trial_one
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string s = "You have an word";
string url = urlTextBox.Text;
string bo = richTextBox1.Text;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
richTextBox1.Text = sr.ReadToEnd();
sr.Close();
int hello = s.IndexOf(bo);
if (hello==0 )
{
MessageBox.Show("The word was found");
}
}
}
}[/code]
<br/>
so how can i do that this is a one time thing and also if this works i may move towards c# then anyway please tell me
<
computers make an world and program makes an empire in the vast world of computers and coder makes an emperor if master one language you can conquer the world of computers.
<br/>
View the full article
I am here with a problem and the problem is that i wish to find out a string in a big text like this :
______________________________________________________________________________
Like if i wanted to find the word <span style="text-decoration:underline string and compare a <span style="text-decoration:underline string to the other
<span style="text-decoration:underline string in this sentence.
______________________________________________________________________________
The program then sees if there is the word string then program will look at it to find the word or the string using IF() statement then make a text box saying : The word was found .
<pre class="prettyprint" style=" using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace Trial_one
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string s = "You have an word";
string url = urlTextBox.Text;
string bo = richTextBox1.Text;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
richTextBox1.Text = sr.ReadToEnd();
sr.Close();
int hello = s.IndexOf(bo);
if (hello==0 )
{
MessageBox.Show("The word was found");
}
}
}
}[/code]
<br/>
so how can i do that this is a one time thing and also if this works i may move towards c# then anyway please tell me
<
computers make an world and program makes an empire in the vast world of computers and coder makes an emperor if master one language you can conquer the world of computers.
<br/>
View the full article