Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralDrag and Drop into a node of a treeview Pin
Bill Dean4-Sep-02 11:36
Bill Dean4-Sep-02 11:36 
GeneralRe: Drag and Drop into a node of a treeview Pin
Ryan Cromwell5-Sep-02 2:49
Ryan Cromwell5-Sep-02 2:49 
GeneralRe: Drag and Drop into a node of a treeview Pin
Bill Dean5-Sep-02 4:19
Bill Dean5-Sep-02 4:19 
GeneralParameters question Pin
leppie4-Sep-02 10:29
leppie4-Sep-02 10:29 
GeneralRe: Parameters question Pin
jparsons5-Sep-02 2:59
jparsons5-Sep-02 2:59 
GeneralRe: Parameters question Pin
leppie5-Sep-02 3:13
leppie5-Sep-02 3:13 
QuestionReplace with a C# Regex? Pin
Zombies with Coffee, LLC4-Sep-02 9:25
professionalZombies with Coffee, LLC4-Sep-02 9:25 
AnswerRe: Replace with a C# Regex? Pin
Eric Gunnerson (msft)4-Sep-02 10:17
Eric Gunnerson (msft)4-Sep-02 10:17 
You'll want to use Regex.Replace, and then create a replacement string. Something like:

Regex regName = new Regex( @"(?<last>S+), (?<first>S+)");

regName.Replace (string, @"\k<last>, Jane");

The \k refers to whatever matched the "Last" capture.

If you're playing with regex, you might like this utility:

http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=regular%20expression%20workbench
GeneralClickety Pin
David Stone4-Sep-02 12:20
sitebuilderDavid Stone4-Sep-02 12:20 
GeneralUnsafe Question Pin
Nick Parker4-Sep-02 9:24
protectorNick Parker4-Sep-02 9:24 
GeneralRe: Unsafe Question Pin
leppie4-Sep-02 9:39
leppie4-Sep-02 9:39 
GeneralRe: Unsafe Question Pin
Nick Parker4-Sep-02 9:43
protectorNick Parker4-Sep-02 9:43 
GeneralOptional parameters Pin
Nnamdi Onyeyiri4-Sep-02 8:21
Nnamdi Onyeyiri4-Sep-02 8:21 
GeneralRe: Optional parameters Pin
Nick Parker4-Sep-02 8:56
protectorNick Parker4-Sep-02 8:56 
GeneralRe: Optional parameters Pin
leppie4-Sep-02 9:33
leppie4-Sep-02 9:33 
GeneralRe: Optional parameters Pin
Nick Parker4-Sep-02 9:44
protectorNick Parker4-Sep-02 9:44 
GeneralRe: Optional parameters Pin
Eric Gunnerson (msft)4-Sep-02 10:10
Eric Gunnerson (msft)4-Sep-02 10:10 
GeneralRe: Optional parameters Pin
leppie4-Sep-02 10:18
leppie4-Sep-02 10:18 
GeneralRe: Optional parameters Pin
David Stone4-Sep-02 12:22
sitebuilderDavid Stone4-Sep-02 12:22 
GeneralRe: Optional parameters Pin
Paul Riley4-Sep-02 12:21
Paul Riley4-Sep-02 12:21 
GeneralRe: Optional parameters Pin
Nick Parker5-Sep-02 2:59
protectorNick Parker5-Sep-02 2:59 
GeneralRe: Optional parameters Pin
leppie4-Sep-02 13:20
leppie4-Sep-02 13:20 
GeneralRe: Optional parameters Pin
Paul Riley5-Sep-02 2:10
Paul Riley5-Sep-02 2:10 
GeneralRe: Optional parameters Pin
leppie5-Sep-02 2:24
leppie5-Sep-02 2:24 
GeneralRe: Optional parameters Pin
Nick Parker5-Sep-02 3:02
protectorNick Parker5-Sep-02 3: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.