Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
AnswerRe: how can i get the last word from the string Pin
Mycroft Holmes13-Sep-08 16:06
professionalMycroft Holmes13-Sep-08 16:06 
AnswerRe: how can i get the last word from the string [modified] Pin
Eslam Afifi13-Sep-08 16:11
Eslam Afifi13-Sep-08 16:11 
AnswerRe: how can i get the last word from the string Pin
Mohammad Dayyan13-Sep-08 20:56
Mohammad Dayyan13-Sep-08 20:56 
GeneralRe: how can i get the last word from the string Pin
Mycroft Holmes13-Sep-08 21:51
professionalMycroft Holmes13-Sep-08 21:51 
GeneralRe: how can i get the last word from the string Pin
#realJSOP14-Sep-08 2:12
mve#realJSOP14-Sep-08 2:12 
GeneralRe: how can i get the last word from the string Pin
Mohammad Dayyan14-Sep-08 2:15
Mohammad Dayyan14-Sep-08 2:15 
GeneralRe: how can i get the last word from the string Pin
Eslam Afifi14-Sep-08 5:18
Eslam Afifi14-Sep-08 5:18 
GeneralRe: how can i get the last word from the string Pin
#realJSOP14-Sep-08 5:46
mve#realJSOP14-Sep-08 5:46 
The OP's example CLEARLY indicatedc spaces were being used to separate words in a TextBox. What other kind of whitespace characters did you have in mind?

First, using RegEx obfuscates the intent of the code, and slows it down besides. I can count on ONE HAND the number of people I know that would use RegEx over the much simpler construct of LastIndexOf(). As soon as new programmers learn that readability and maintainability is much more important than "clever code", we'll all be a lot better off. Sure, RegEx has it's place, but not for this problem.

A valid example of requiring RegEx is validating that an email address is properly formatted. But for finding the last word in a string of words separated by spaces? Not on your life.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: how can i get the last word from the string Pin
Eslam Afifi14-Sep-08 7:09
Eslam Afifi14-Sep-08 7:09 
AnswerRe: how can i get the last word from the string Pin
Shweta Gulati14-Sep-08 18:26
Shweta Gulati14-Sep-08 18:26 
QuestionSend File As Download After Complete? [modified] Pin
Arcdigital13-Sep-08 15:28
Arcdigital13-Sep-08 15:28 
AnswerRe: Send File As Download After Complete? Pin
Anthony Mushrow13-Sep-08 16:20
professionalAnthony Mushrow13-Sep-08 16:20 
QuestionA Drag-n-Drop question ? Pin
Mohammad Dayyan13-Sep-08 12:29
Mohammad Dayyan13-Sep-08 12:29 
AnswerRe: A Drag-n-Drop question ? Pin
Anthony Mushrow13-Sep-08 16:17
professionalAnthony Mushrow13-Sep-08 16:17 
GeneralRe: A Drag-n-Drop question ? Pin
Mohammad Dayyan14-Sep-08 0:50
Mohammad Dayyan14-Sep-08 0:50 
QuestionInsert Command and access database Pin
Sourie13-Sep-08 7:53
Sourie13-Sep-08 7:53 
AnswerRe: Insert Command and access database Pin
Mbah Dhaim13-Sep-08 8:59
Mbah Dhaim13-Sep-08 8:59 
GeneralRe: Insert Command and access database Pin
Sourie13-Sep-08 17:11
Sourie13-Sep-08 17:11 
GeneralRe: Insert Command and access database Pin
Blue_Boy13-Sep-08 20:13
Blue_Boy13-Sep-08 20:13 
GeneralRe: Insert Command and access database Pin
Sourie13-Sep-08 21:45
Sourie13-Sep-08 21:45 
GeneralRe: Insert Command and access database Pin
Blue_Boy13-Sep-08 23:50
Blue_Boy13-Sep-08 23:50 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 1:18
Sourie14-Sep-08 1:18 
GeneralRe: Insert Command and access database Pin
Blue_Boy14-Sep-08 3:05
Blue_Boy14-Sep-08 3:05 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 4:16
Sourie14-Sep-08 4:16 
GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 4:22
Mbah Dhaim14-Sep-08 4:22 

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.