Click here to Skip to main content
15,351,281 members
Home / Discussions / C#
   

C#

 
GeneralRe: Article about making image background color transparent? Pin
Super Lloyd7-Aug-06 3:46
MemberSuper Lloyd7-Aug-06 3:46 
GeneralRe: Article about making image background color transparent? [modified] Pin
Super Lloyd7-Aug-06 3:54
MemberSuper Lloyd7-Aug-06 3:54 
GeneralRe: Article about making image background color transparent? Pin
wout de zeeuw7-Aug-06 4:30
Memberwout de zeeuw7-Aug-06 4:30 
Questiona simple question about forms ? help please ... Pin
cmpeng347-Aug-06 1:23
Membercmpeng347-Aug-06 1:23 
AnswerRe: a simple question about forms ? help please ... Pin
stancrm7-Aug-06 1:33
Memberstancrm7-Aug-06 1:33 
AnswerRe: a simple question about forms ? help please ... Pin
Tamimi - Code7-Aug-06 1:34
MemberTamimi - Code7-Aug-06 1:34 
QuestionHow to make sure that the outlook has done the send/receive process? Pin
sinanju7-Aug-06 0:46
Membersinanju7-Aug-06 0:46 
QuestionMatch Meta Characters between strings( Regular Expressions) Pin
abhinish6-Aug-06 23:47
Memberabhinish6-Aug-06 23:47 
Hi!
need some help guys
i want to match strings as whole words through regular expressions which contain meta characters.

i tried the Regex.Escape method which "Guffa" suggested me ..

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:


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;			
                 }                
         }

this returns false but according to me it should return true

also if i remove these meta charaters it returns true..

i dont know what m i missing



or is there any other way of matching these meta characters?

abhinav


abhinav

AnswerRe: Match Meta Characters between strings( Regular Expressions) Pin
leppie7-Aug-06 4:50
Memberleppie7-Aug-06 4:50 
Questionposition of the cursor Pin
sarojkumarjena6-Aug-06 23:38
Membersarojkumarjena6-Aug-06 23:38 
AnswerRe: position of the cursor Pin
Stefan Troschuetz6-Aug-06 23:50
MemberStefan Troschuetz6-Aug-06 23:50 
QuestionI've done it but one more thing Pin
diddy346-Aug-06 23:28
Memberdiddy346-Aug-06 23:28 
AnswerRe: I've done it but one more thing Pin
fmardani6-Aug-06 23:55
Memberfmardani6-Aug-06 23:55 
Generalyeah that will do but i need a diff.... Pin
diddy346-Aug-06 23:59
Memberdiddy346-Aug-06 23:59 
AnswerRe: I've done it but one more thing Pin
V.7-Aug-06 2:09
professionalV.7-Aug-06 2:09 
Questioncontrol windows media server programmatically Pin
pratik manandhar6-Aug-06 23:22
Memberpratik manandhar6-Aug-06 23:22 
QuestionKeylogger in C# Pin
Naveed Noor6-Aug-06 23:20
MemberNaveed Noor6-Aug-06 23:20 
AnswerRe: Keylogger in C# Pin
Colin Angus Mackay7-Aug-06 1:04
MemberColin Angus Mackay7-Aug-06 1:04 
AnswerRe: Keylogger in C# Pin
stancrm7-Aug-06 1:35
Memberstancrm7-Aug-06 1:35 
AnswerRe: Keylogger in C# Pin
Sebastian Schneider7-Aug-06 1:40
MemberSebastian Schneider7-Aug-06 1:40 
AnswerRe: Keylogger in C# Pin
Drew McGhie7-Aug-06 6:34
MemberDrew McGhie7-Aug-06 6:34 
QuestionC# data grid related question Pin
Muhammad Ahmed6-Aug-06 23:20
MemberMuhammad Ahmed6-Aug-06 23:20 
AnswerRe: C# data grid related question Pin
abhinish7-Aug-06 0:35
Memberabhinish7-Aug-06 0:35 
GeneralRe: C# data grid related question [modified] Pin
abhinish7-Aug-06 0:46
Memberabhinish7-Aug-06 0:46 
GeneralRe: C# data grid related question Pin
Muhammad Ahmed7-Aug-06 0:47
MemberMuhammad Ahmed7-Aug-06 0: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.