0

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..........?
:)

0

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.......

0

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.

0

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

0

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

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

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

0

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:

1

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.

Votes + Comments
Great!
0

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:

Edited by VibhorG: n/a

0

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.

Edited by sknake: n/a

0

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

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

Kindly help me in this

0

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!

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.