Thanks for your reply Mr. Scott.........
I m done what u mentioned and i got the result also, but what is this error, why i have to click button again and again......?
Is there is no other solution for this..........?
:)

Well Mr. Scott that runtime error is solved now.....
And my problem is almost solve now, just one more thing i want to ask you related to this, that if form text includes special characters also like !@#%^&*(){}+[].....etc.
then what line of code i have include in this.Because it is not taking(match) any special characters.......

Because that information is not particularly relevant to a search. Words don't consist of those characters -- they are used for punctuation. The Regex.Split() line is what strips them out because it splits on word boundaries which is when a word breaks due to a white space or one of the characters you listed above.

Since form text may contains special characters also, so what i have to do in that case......?

Define what separates a word, and what should be included. Example:

Include: !@#$%^&*().-+~`
Exclude: Tab Space

FYI -- You're probably going to regret doing this :)

Well my form text includes words as well as mathematical expression.
suppose, for example: the form heading is:
Find the value of 2x^2+5x+6........
In the same way i want to use any of the special characters......
i think now you understand.........:pretty:

Yes but then you would have to key in the exact forumla to find the form which kind of defeats the purpose of searching because you need to match the exact string.

Unless you match any number with any number, then recognize "x" as a math variable and allow for any single character.......

I swear to god i'm never posting on another "Search" thread. The rules keep changing and they all turn out to be 20398092384 posts.

commented: Great! +13

I don't understand why are you getting so anoid.
You please tell me one and last thing if my form text has special characters , then how matching will be done.......
Kindly reply Mr. Scott.......... :pretty:

You want to match based on word. Regex defines a word as any sequence of characters [a-zA-Z0-9].

You define words as? ... a sequence of characters plus:!@#($@*^(_*@^!#&%

Do you want to change it so the _only_ thing that separates a word is a space? That way you can include all of your control characters.

Yes.It is a sequence of characters plus:!@#($@*^(_*@^!#&%

And the _only_ thing that separates a word is a space?

Kindly help me in this

Locate these two lines in FormSearcher.cs:

List<string> lstSearchText = Regex.Split(SearchText, @"\W", RegexOptions.IgnorePatternWhitespace).ToList();
      List<string> lstFormText = Regex.Split(FormText, @"\W", RegexOptions.IgnorePatternWhitespace).ToList();

Change the \W to \s :

List<string> lstSearchText = Regex.Split(SearchText, @"\s", RegexOptions.IgnorePatternWhitespace).ToList();
      List<string> lstFormText = Regex.Split(FormText, @"\s", RegexOptions.IgnorePatternWhitespace).ToList();

All done! Please mark this thread as solved and good luck!

Thank you very much Mr. Scott..........
For giving your valuable time for this thread.......:$

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.