Click here to Skip to main content
15,922,523 members

Comments by PeteKipe (Top 3 by date)

PeteKipe 2-Aug-14 1:20am View    
Oops, had my head where the sun don't shine... It's working perfectly, and I figured out how to handle suffixes on my own. Thanks!
PeteKipe 1-Aug-14 13:56pm View    
...and as I mentioned in my original question, I also need a pattern to eliminate trailing suffixes, like "Jr", "Sr", etc. Thanks in advance!
PeteKipe 1-Aug-14 13:44pm View    
It's not working for me, OG. I tried running it against names that begin "Mr.", "Mr", "mr." and "mr", but the statement Regex.Replace(strName, pattern, "") doesn't cause strName to change. The string "pattern" is set to "^(mr|mrs|miss|dr|prof)[\.\s]*". Is the pattern sensitive to case? Also, what about a period after the prefix -- will that be handled, or do I need to add additional tests to the pattern?