Click here to Skip to main content
15,499,571 members
Home / Discussions / C#
   

C#

 
GeneralRe: NULLABLE type Pin
Mycroft Holmes28-Oct-09 15:53
professionalMycroft Holmes28-Oct-09 15:53 
GeneralRe: NULLABLE type Pin
Keith Barrow29-Oct-09 1:20
professionalKeith Barrow29-Oct-09 1:20 
QuestionOutlining option is not coming on right clicking in text Pin
abcurl28-Oct-09 3:19
Memberabcurl28-Oct-09 3:19 
AnswerRe: Outlining option is not coming on right clicking in text Pin
Abhishek Sur28-Oct-09 4:31
professionalAbhishek Sur28-Oct-09 4:31 
AnswerRe: Outlining option is not coming on right clicking in text Pin
Richard MacCutchan28-Oct-09 5:02
mveRichard MacCutchan28-Oct-09 5:02 
QuestionRe: Outlining option is not coming on right clicking in text Pin
abcurl28-Oct-09 5:19
Memberabcurl28-Oct-09 5:19 
GeneralRe: Outlining option is not coming on right clicking in text Pin
Richard MacCutchan28-Oct-09 5:52
mveRichard MacCutchan28-Oct-09 5:52 
QuestionRegular Expression Find And Replace ? Pin
Jacobb Michael28-Oct-09 3:10
MemberJacobb Michael28-Oct-09 3:10 
Hi all,

See the bellow lines

string sTmp = "jacob martin (234) 890-3456 UsPhone comes -4533 UsPhone";
string patern = @"\(\d{3}\)\s\d{3}-\d{4}"; //Find
string sRpl = "XXXX";//Replace
string sResult = "jacob martin (234) 890-XXXX UsPhone comes -4533 UsPhone";



I want to replace the 4 digit elements with XXXX which is @"\(\d{3}\)\s\d{3}-\d{4}" in use formate.

See there is another 4 Digit string is there (4533) but it is not in the us pattern so i have to leave that.

can any one help me how to write Regular Expression for that

My Question is Simple

1.STmp is the input string
2.The Reg has to find the us patern (@"\(\d{3}\)\s\d{3}-\d{4}")
3.Replace the last 4 Digts as XXXX
4.Leave the another 4 Digits which is not as valid usphone no -4533
5.The ourput Replace String should be as "jacob martin (234) 890-XXXX UsPhone comes -4533 UsPhone"

Please some one help me to do

thanks in advance
AnswerRe: Regular Expression Find And Replace ? Pin
Philip Tyre28-Oct-09 4:09
MemberPhilip Tyre28-Oct-09 4:09 
Questionresize user control Pin
User 663428928-Oct-09 3:10
MemberUser 663428928-Oct-09 3:10 
AnswerMessage Closed Pin
28-Oct-09 3:15
Memberstancrm28-Oct-09 3:15 
GeneralRe: resize user control Pin
User 663428928-Oct-09 3:37
MemberUser 663428928-Oct-09 3:37 
GeneralMessage Closed Pin
28-Oct-09 4:22
Memberstancrm28-Oct-09 4:22 
GeneralRe: resize user control Pin
User 663428928-Oct-09 4:34
MemberUser 663428928-Oct-09 4:34 
GeneralMessage Closed Pin
28-Oct-09 4:49
Memberstancrm28-Oct-09 4:49 
GeneralRe: resize user control Pin
User 663428928-Oct-09 5:09
MemberUser 663428928-Oct-09 5:09 
GeneralRe: resize user control Pin
musefan28-Oct-09 4:40
Membermusefan28-Oct-09 4:40 
QuestionCreate tree view Pin
Indresh121028-Oct-09 2:55
MemberIndresh121028-Oct-09 2:55 
AnswerRe: Create tree view Pin
Calla28-Oct-09 3:08
MemberCalla28-Oct-09 3:08 
AnswerRe: Create tree view Pin
AhmedMasum28-Oct-09 4:29
MemberAhmedMasum28-Oct-09 4:29 
QuestionHow do lappling CSS to windows application Pin
benson.misi28-Oct-09 2:36
Memberbenson.misi28-Oct-09 2:36 
AnswerRe: How do lappling CSS to windows application Pin
OriginalGriff28-Oct-09 2:42
mveOriginalGriff28-Oct-09 2:42 
GeneralRe: How do lappling CSS to windows application Pin
benson.misi28-Oct-09 2:49
Memberbenson.misi28-Oct-09 2:49 
GeneralRe: How do lappling CSS to windows application Pin
OriginalGriff28-Oct-09 4:54
mveOriginalGriff28-Oct-09 4:54 
Question[Message Deleted] Pin
Mads11528-Oct-09 1:58
MemberMads11528-Oct-09 1:58 

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.