Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: NULLABLE type Pin
Mycroft Holmes28-Oct-09 14:53
professionalMycroft Holmes28-Oct-09 14:53 
GeneralRe: NULLABLE type Pin
Keith Barrow29-Oct-09 0:20
professionalKeith Barrow29-Oct-09 0:20 
QuestionOutlining option is not coming on right clicking in text Pin
abcurl28-Oct-09 2:19
abcurl28-Oct-09 2:19 
AnswerRe: Outlining option is not coming on right clicking in text Pin
Abhishek Sur28-Oct-09 3:31
professionalAbhishek Sur28-Oct-09 3:31 
AnswerRe: Outlining option is not coming on right clicking in text Pin
Richard MacCutchan28-Oct-09 4:02
mveRichard MacCutchan28-Oct-09 4:02 
QuestionRe: Outlining option is not coming on right clicking in text Pin
abcurl28-Oct-09 4:19
abcurl28-Oct-09 4:19 
GeneralRe: Outlining option is not coming on right clicking in text Pin
Richard MacCutchan28-Oct-09 4:52
mveRichard MacCutchan28-Oct-09 4:52 
QuestionRegular Expression Find And Replace ? Pin
Jacobb Michael28-Oct-09 2:10
Jacobb Michael28-Oct-09 2: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 3:09
Philip Tyre28-Oct-09 3:09 
Questionresize user control Pin
User 663428928-Oct-09 2:10
User 663428928-Oct-09 2:10 
AnswerMessage Closed Pin
28-Oct-09 2:15
stancrm28-Oct-09 2:15 
GeneralRe: resize user control Pin
User 663428928-Oct-09 2:37
User 663428928-Oct-09 2:37 
GeneralMessage Closed Pin
28-Oct-09 3:22
stancrm28-Oct-09 3:22 
GeneralRe: resize user control Pin
User 663428928-Oct-09 3:34
User 663428928-Oct-09 3:34 
GeneralMessage Closed Pin
28-Oct-09 3:49
stancrm28-Oct-09 3:49 
GeneralRe: resize user control Pin
User 663428928-Oct-09 4:09
User 663428928-Oct-09 4:09 
GeneralRe: resize user control Pin
musefan28-Oct-09 3:40
musefan28-Oct-09 3:40 
QuestionCreate tree view Pin
Indresh121028-Oct-09 1:55
Indresh121028-Oct-09 1:55 
AnswerRe: Create tree view Pin
Calla28-Oct-09 2:08
Calla28-Oct-09 2:08 
AnswerRe: Create tree view Pin
AhmedMasum28-Oct-09 3:29
AhmedMasum28-Oct-09 3:29 
QuestionHow do lappling CSS to windows application Pin
benson.misi28-Oct-09 1:36
benson.misi28-Oct-09 1:36 
AnswerRe: How do lappling CSS to windows application Pin
OriginalGriff28-Oct-09 1:42
mveOriginalGriff28-Oct-09 1:42 
GeneralRe: How do lappling CSS to windows application Pin
benson.misi28-Oct-09 1:49
benson.misi28-Oct-09 1:49 
GeneralRe: How do lappling CSS to windows application Pin
OriginalGriff28-Oct-09 3:54
mveOriginalGriff28-Oct-09 3:54 
Question[Message Deleted] Pin
Mads11528-Oct-09 0:58
Mads11528-Oct-09 0: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.