Click here to Skip to main content
15,885,855 members
Home / Discussions / C#
   

C#

 
QuestionExposing IDispatch via C# ?? Pin
LongRange.Shooter10-Apr-03 15:55
LongRange.Shooter10-Apr-03 15:55 
AnswerRe: Exposing IDispatch via C# ?? Pin
Bog10-Apr-03 17:59
Bog10-Apr-03 17:59 
QuestionIs there a way to make native win32 call? Pin
Le centriste10-Apr-03 6:08
Le centriste10-Apr-03 6:08 
AnswerRe: Is there a way to make native win32 call? Pin
Duncan Edwards Jones10-Apr-03 6:13
professionalDuncan Edwards Jones10-Apr-03 6:13 
GeneralRe: Is there a way to make native win32 call? Pin
Paresh Gheewala10-Apr-03 10:56
Paresh Gheewala10-Apr-03 10:56 
GeneralRe: Is there a way to make native win32 call? Pin
spolia10-Apr-03 12:46
spolia10-Apr-03 12:46 
GeneralRe: Is there a way to make native win32 call? Pin
Le centriste11-Apr-03 3:42
Le centriste11-Apr-03 3:42 
GeneralRegular expression Pin
zoltan_ie10-Apr-03 5:49
zoltan_ie10-Apr-03 5:49 
Look at this code...

==============================================================================
string strClaim = "BER";

Regex objNaturalPattern = new Regex("[Bb][Ee][Rr]|[Tt][Ww][Oo]|[Ss][Tt][Oo]");

objNaturalPattern.IsMatch(strClaim);
==============================================================================

ok the return value to "objNaturalPattern.IsMatch(strClaim);" will be true as it matches [Bb][Ee][Rr]. Now what I might want to do and it needn't only apply to this example is know which Regular expression ([Bb][Ee][Rr]|[Tt][Ww][Oo]|[Ss][Tt][Oo])the string matched.

Is there any possible way to get some kinda of return value to say which one was matched?

as in a string matching [Bb][Ee][Rr] would return 0
as in a string matching [Tt][Ww][Oo] would return 1
as in a string matching [Ss][Tt][Oo] would return 2
no match could return -1


Is this posible? Is there a method that I have over looked?
elp!

Thomas
GeneralRe: Regular expression Pin
Bog10-Apr-03 8:20
Bog10-Apr-03 8:20 
GeneralDirectory selection dialog Pin
Le centriste10-Apr-03 5:34
Le centriste10-Apr-03 5:34 
GeneralRe: Directory selection dialog Pin
James T. Johnson10-Apr-03 8:17
James T. Johnson10-Apr-03 8:17 
GeneralRe: Directory selection dialog Pin
Chris Austin10-Apr-03 8:48
Chris Austin10-Apr-03 8:48 
GeneralRe: Directory selection dialog Pin
Chris Austin10-Apr-03 10:17
Chris Austin10-Apr-03 10:17 
GeneralRe: Directory selection dialog Pin
Paresh Gheewala10-Apr-03 11:00
Paresh Gheewala10-Apr-03 11:00 
GeneralTx for your answers all Pin
Le centriste11-Apr-03 3:43
Le centriste11-Apr-03 3:43 
GeneralO-R Mapping tool for .NET Pin
Avaril10-Apr-03 2:31
Avaril10-Apr-03 2:31 
GeneralRe: O-R Mapping tool for .NET Pin
James T. Johnson10-Apr-03 8:20
James T. Johnson10-Apr-03 8:20 
GeneralRe: O-R Mapping tool for .NET Pin
Avaril10-Apr-03 23:51
Avaril10-Apr-03 23:51 
GeneralRe: O-R Mapping tool for .NET Pin
Rocky Moore11-Apr-03 18:25
Rocky Moore11-Apr-03 18:25 
GeneralLine Drawing (joining the dots!!) Pin
Paul Griffin10-Apr-03 1:12
Paul Griffin10-Apr-03 1:12 
GeneralRe: Line Drawing (joining the dots!!) Pin
Philip Fitzsimons10-Apr-03 3:38
Philip Fitzsimons10-Apr-03 3:38 
GeneralRe: Line Drawing (joining the dots!!) Pin
Don_s10-Apr-03 4:18
Don_s10-Apr-03 4:18 
GeneralCounting characters in a buffer Pin
Overfiend10-Apr-03 0:31
Overfiend10-Apr-03 0:31 
GeneralRe: Counting characters in a buffer Pin
TigerNinja_10-Apr-03 2:58
TigerNinja_10-Apr-03 2:58 
GeneralOLE from VB6 into C# Pin
Trevor Godwin9-Apr-03 23:31
sussTrevor Godwin9-Apr-03 23:31 

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.