Click here to Skip to main content
15,880,608 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get Points out of Regions Pin
John S Mangam3-Aug-06 23:23
John S Mangam3-Aug-06 23:23 
GeneralRe: How to get Points out of Regions Pin
John S Mangam3-Aug-06 23:18
John S Mangam3-Aug-06 23:18 
QuestionError Evaluating Regular Expression Pin
abhinish3-Aug-06 21:16
abhinish3-Aug-06 21:16 
AnswerRe: Error Evaluating Regular Expression Pin
Guffa3-Aug-06 22:28
Guffa3-Aug-06 22:28 
GeneralRe: Error Evaluating Regular Expression Pin
abhinish3-Aug-06 23:14
abhinish3-Aug-06 23:14 
GeneralRe: Error Evaluating Regular Expression Pin
Ed.Poore3-Aug-06 23:47
Ed.Poore3-Aug-06 23:47 
GeneralRe: Error Evaluating Regular Expression Pin
Guffa5-Aug-06 13:55
Guffa5-Aug-06 13:55 
GeneralRe: Error Evaluating Regular Expression Pin
abhinish6-Aug-06 20:45
abhinish6-Aug-06 20:45 
Hi!
thanks again for the reply guys.

i tried the Regex.Escape method.

it works good and don't throw any exception but it do not match the whole word also.

m i again missing some thing..
here is my code:

<code>public bool sSearchWholeWord()
           {

               string sSearchWord="***SPAM***";
                       string content="hi this is ***SPAM*** testing";

           string pattern =  @"\b" + Regex.Escape(sSearchWord) + @"\b";
           Regex re =new Regex(pattern,RegexOptions.IgnorePatternWhitespace);
           try
           {
               if(re.IsMatch(content))
               {
                   return true;

               }
               else
               {
                   return false;
               }
                       }
                       catch(Exception e)
           {
               Response.Write(e.ToString());
               return false;
           }
               }</code>


this returns false but according to me it should return true

i dont know what m i missing

abhinav

QuestionSending emails in C# Pin
minniemooo3-Aug-06 21:03
minniemooo3-Aug-06 21:03 
AnswerRe: Sending emails in C# Pin
Stefan Troschuetz3-Aug-06 21:10
Stefan Troschuetz3-Aug-06 21:10 
Questioncombobox datasource problem Pin
V.3-Aug-06 20:52
professionalV.3-Aug-06 20:52 
AnswerRe: combobox datasource problem Pin
Christian Graus3-Aug-06 20:58
protectorChristian Graus3-Aug-06 20:58 
GeneralRe: combobox datasource problem Pin
V.3-Aug-06 21:28
professionalV.3-Aug-06 21:28 
GeneralRe: combobox datasource problem Pin
psamy3-Aug-06 21:44
psamy3-Aug-06 21:44 
GeneralRe: combobox datasource problem Pin
V.3-Aug-06 22:01
professionalV.3-Aug-06 22:01 
GeneralRe: combobox datasource problem Pin
psamy3-Aug-06 22:26
psamy3-Aug-06 22:26 
GeneralRe: combobox datasource problem Pin
V.3-Aug-06 21:43
professionalV.3-Aug-06 21:43 
QuestionXmlReader problem when XML has non foreign special characters [modified] Pin
Andreas X3-Aug-06 20:51
professionalAndreas X3-Aug-06 20:51 
AnswerRe: XmlReader problem when XML has non foreign special characters Pin
Guffa3-Aug-06 22:40
Guffa3-Aug-06 22:40 
GeneralRe: XmlReader problem when XML has non foreign special characters [modified] Pin
lmoelleb3-Aug-06 22:56
lmoelleb3-Aug-06 22:56 
AnswerRe: XmlReader problem when XML has non foreign special characters [modified] Pin
eggie55-Aug-06 21:02
eggie55-Aug-06 21:02 
QuestionTo Add a User to Windows programtically Pin
Deepa N3-Aug-06 20:48
Deepa N3-Aug-06 20:48 
AnswerRe: To Add a User to Windows programtically Pin
Shajeel3-Aug-06 21:10
Shajeel3-Aug-06 21:10 
QuestionoledBconnection error Pin
skyeddie3-Aug-06 19:27
skyeddie3-Aug-06 19:27 
AnswerRe: oledBconnection error Pin
Expert Coming3-Aug-06 19:47
Expert Coming3-Aug-06 19:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.