Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
GeneralRe: Runtime form Object Reference Pin
Colin Angus Mackay4-Jan-07 8:07
Colin Angus Mackay4-Jan-07 8:07 
QuestionDetecting sql server and db2 Pin
saqib823-Jan-07 19:12
saqib823-Jan-07 19:12 
AnswerRe: Detecting sql server and db2 Pin
ednrgc4-Jan-07 2:20
ednrgc4-Jan-07 2:20 
QuestionDockpanel with Form as UIElement Pin
GunaChinna3-Jan-07 18:17
GunaChinna3-Jan-07 18:17 
Questioncopying a reference Pin
swjam3-Jan-07 16:07
swjam3-Jan-07 16:07 
AnswerRe: copying a reference Pin
Phillip M. Hoff3-Jan-07 17:32
Phillip M. Hoff3-Jan-07 17:32 
Question"Mixing" events? Pin
Lord Kixdemp3-Jan-07 15:46
Lord Kixdemp3-Jan-07 15:46 
QuestionRegex.Replace Question Pin
DevinG3-Jan-07 15:33
DevinG3-Jan-07 15:33 
Can someone explain why numbers are being dropped off in this regular expression replace statement??

            string phone = "1012345678912345";<br />
            string newphone = Regex.Replace(phone, @"^((?<country>[1])([ ]|.|-))(\(|\[)?(?<area>\d{3})(\)[ ]?|\][ ]?|.|-)?(?<prefix>\d{3})(.|-|[ ])?(?<suffix>\d{4})[ ]?(x|X|#|.)?(?<ext>\d{0,5})$", "${country} (${area}) ${prefix}-${suffix} #${ext}");        <br />
            <br />
            newphone = newphone.TrimEnd('#');<br />
            newphone = newphone.Trim();<br />
<br />
            Console.WriteLine(newphone);<br />


The output is: 1 (123) 567-9123 #5
What it should be is 1 (012) 345-6789 #12345

Why is a number being removed between each storage area??? Thanks for your help.
AnswerRe: Regex.Replace Question Pin
ednrgc4-Jan-07 2:59
ednrgc4-Jan-07 2:59 
GeneralRe: Regex.Replace Question Pin
DevinG4-Jan-07 6:53
DevinG4-Jan-07 6:53 
GeneralRe: Regex.Replace Question Pin
ednrgc4-Jan-07 6:56
ednrgc4-Jan-07 6:56 
GeneralRe: Regex.Replace Question Pin
DevinG4-Jan-07 7:43
DevinG4-Jan-07 7:43 
GeneralRe: Regex.Replace Question Pin
ednrgc4-Jan-07 8:17
ednrgc4-Jan-07 8:17 
AnswerRe: Regex.Replace Question Pin
ednrgc4-Jan-07 3:20
ednrgc4-Jan-07 3:20 
GeneralRe: Regex.Replace Question Pin
DevinG4-Jan-07 7:01
DevinG4-Jan-07 7:01 
QuestionGraphics help Pin
Nooie3-Jan-07 14:47
Nooie3-Jan-07 14:47 
AnswerRe: Graphics help Pin
Chris Buckett3-Jan-07 21:37
Chris Buckett3-Jan-07 21:37 
GeneralRe: Graphics help Pin
Nooie8-Jan-07 21:50
Nooie8-Jan-07 21:50 
QuestionDictionary XML Serialization Problem [modified] Pin
dubbaluga3-Jan-07 13:33
dubbaluga3-Jan-07 13:33 
QuestionI need urgent help - thanks Pin
rpsjs3-Jan-07 13:22
rpsjs3-Jan-07 13:22 
AnswerRe: I need urgent help - thanks Pin
Christian Graus3-Jan-07 13:34
protectorChristian Graus3-Jan-07 13:34 
AnswerRe: I need urgent help - thanks Pin
Not Active3-Jan-07 17:56
mentorNot Active3-Jan-07 17:56 
GeneralRe: I need urgent help - thanks Pin
Paul Conrad3-Jan-07 21:26
professionalPaul Conrad3-Jan-07 21:26 
Questionstack heap confusion Pin
swjam3-Jan-07 12:58
swjam3-Jan-07 12:58 
AnswerRe: stack heap confusion Pin
Colin Angus Mackay3-Jan-07 13:02
Colin Angus Mackay3-Jan-07 13:02 

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.