Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
QuestionForms.Panel - stop OnKeyDown repeating [modified] Pin
lukeer11-May-11 4:31
lukeer11-May-11 4:31 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
Luc Pattyn11-May-11 4:38
sitebuilderLuc Pattyn11-May-11 4:38 
GeneralRe: Forms.Panel - stop OnKeyDown repeating Pin
lukeer11-May-11 20:16
lukeer11-May-11 20:16 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
Luc Pattyn12-May-11 0:42
sitebuilderLuc Pattyn12-May-11 0:42 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
lukeer11-May-11 21:08
lukeer11-May-11 21:08 
GeneralRe: Forms.Panel - stop OnKeyDown repeating Pin
BobJanova12-May-11 1:43
BobJanova12-May-11 1:43 
QuestionRegex to retrieve phone numbers Pin
Etienne_12311-May-11 0:39
Etienne_12311-May-11 0:39 
AnswerRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:32
Hiren solanki11-May-11 1:32 
You may find this solution just made for you Helpful.

string Text = "John Doe, john@bleh.com, (H) 0412623423234, (W) 1290034589345, Jane Doe, ";
        Regex HomePhoneRegex = new Regex(@"\(H\)[ ]*\d{13}");
        Regex WorkPhoneRegex = new Regex(@"\(W\)[ ]*\d{13}");
        Regex EmailRegex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");

        String HomePhone = String.Empty;
        String WorkPhone = String.Empty;
        String Email = String.Empty;

        if (HomePhoneRegex.Matches(Text).Count == 1)
        {
            HomePhone = HomePhoneRegex.Matches(Text)[0].Value.Replace("(H)", String.Empty).Trim();
        }
        if (WorkPhoneRegex.Matches(Text).Count == 1)
        {
            WorkPhone = WorkPhoneRegex.Matches(Text)[0].Value.Replace("(W)", String.Empty).Trim();
        }

        if (EmailRegex.Matches(Text).Count == 1)
        {
            Email = EmailRegex.Matches(Text)[0].ToString();
        }

Regards,
Hiren.

-"I don't know, I don't care, and it doesn't make any difference".

GeneralRe: Regex to retrieve phone numbers Pin
Etienne_12311-May-11 1:42
Etienne_12311-May-11 1:42 
GeneralRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:44
Hiren solanki11-May-11 1:44 
GeneralRe: Regex to retrieve phone numbers Pin
Etienne_12311-May-11 1:51
Etienne_12311-May-11 1:51 
GeneralRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:53
Hiren solanki11-May-11 1:53 
AnswerRe: Regex to retrieve phone numbers Pin
PIEBALDconsult11-May-11 2:40
mvePIEBALDconsult11-May-11 2:40 
QuestionCan't apply Contrast of Image Pin
Anubhava Dimri11-May-11 0:04
Anubhava Dimri11-May-11 0:04 
AnswerRe: Can't apply Contrast of Image Pin
Luc Pattyn11-May-11 0:21
sitebuilderLuc Pattyn11-May-11 0:21 
GeneralRe: Can't apply Contrast of Image Pin
Anubhava Dimri11-May-11 0:35
Anubhava Dimri11-May-11 0:35 
GeneralRe: Can't apply Contrast of Image Pin
Luc Pattyn11-May-11 0:46
sitebuilderLuc Pattyn11-May-11 0:46 
GeneralRe: Can't apply Contrast of Image [modified] Pin
Anubhava Dimri11-May-11 1:00
Anubhava Dimri11-May-11 1:00 
GeneralRe: Can't apply Contrast of Image Pin
Richard MacCutchan11-May-11 2:45
mveRichard MacCutchan11-May-11 2:45 
QuestionRe: Can't apply Contrast of Image Pin
Mark Salsbery11-May-11 5:41
Mark Salsbery11-May-11 5:41 
AnswerRe: Can't apply Contrast of Image Pin
Anubhava Dimri11-May-11 18:19
Anubhava Dimri11-May-11 18:19 
GeneralRe: Can't apply Contrast of Image Pin
Mark Salsbery11-May-11 18:56
Mark Salsbery11-May-11 18:56 
AnswerRe: Can't apply Contrast of Image Pin
_Erik_11-May-11 5:46
_Erik_11-May-11 5:46 
GeneralRe: Can't apply Contrast of Image Pin
Mark Salsbery11-May-11 6:26
Mark Salsbery11-May-11 6:26 
GeneralRe: Can't apply Contrast of Image Pin
_Erik_12-May-11 4:35
_Erik_12-May-11 4:35 

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.