Click here to Skip to main content
15,909,373 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I despair for our profession. Pin
Brady Kelly3-Nov-16 6:05
Brady Kelly3-Nov-16 6:05 
GeneralRe: I despair for our profession. Pin
phil.o3-Nov-16 6:17
professionalphil.o3-Nov-16 6:17 
GeneralRe: I despair for our profession. Pin
Maximilien3-Nov-16 4:27
Maximilien3-Nov-16 4:27 
GeneralRe: I despair for our profession. Pin
F-ES Sitecore3-Nov-16 4:38
professionalF-ES Sitecore3-Nov-16 4:38 
GeneralRe: I despair for our profession. Pin
Brady Kelly3-Nov-16 6:08
Brady Kelly3-Nov-16 6:08 
GeneralRe: I despair for our profession. Pin
Marc Clifton3-Nov-16 5:15
mvaMarc Clifton3-Nov-16 5:15 
GeneralRe: I despair for our profession. Pin
Brady Kelly3-Nov-16 6:16
Brady Kelly3-Nov-16 6:16 
GeneralRe: I despair for our profession. Pin
PIEBALDconsult3-Nov-16 9:42
mvePIEBALDconsult3-Nov-16 9:42 
Ah, good, a RegEx question. Ehhhxcellent. Cool | :cool:

Certainly the caret (^) isn't going to do it; but I expected the dollar sign ($) to work.

However, it doesn't and the MSDN documentation isn't as clear as it could be.

One place says: The match must occur at the end of the string or before \n at the end of the line or string. (Note the "before".)

Another place says: By default, $ matches only the end of the input string. If you specify the RegexOptions.Multiline option, it matches either the newline character (\n) or the end of the input string.

For these two statements to both be correct when using Multiline, the $ must act like a Zero-width positive lookahead assertion similar to (?=\n) -- it "matches" the linefeed character, but it doesn't consume it.

Caret behaves like a Zero-width positive lookbehind assertion -- (?<=\n) .

Therefore the dollar sign isn't going to do what you want either.

Your Romulan friend appears to have a reasonable solution.


As to "I despair for our profession", I blame Microsoft.
GeneralRe: I despair for our profession. Pin
PIEBALDconsult7-Nov-16 9:59
mvePIEBALDconsult7-Nov-16 9:59 
GeneralThese browsers that have a separate process for each tab Pin
Rob Philpott3-Nov-16 3:26
Rob Philpott3-Nov-16 3:26 
GeneralRe: These browsers that have a separate process for each tab Pin
den2k883-Nov-16 3:30
professionalden2k883-Nov-16 3:30 
GeneralRe: These browsers that have a separate process for each tab Pin
lopatir3-Nov-16 5:56
lopatir3-Nov-16 5:56 
GeneralRe: These browsers that have a separate process for each tab Pin
den2k883-Nov-16 6:20
professionalden2k883-Nov-16 6:20 
GeneralRe: These browsers that have a separate process for each tab Pin
Kyle Moyer3-Nov-16 9:30
Kyle Moyer3-Nov-16 9:30 
GeneralRe: These browsers that have a separate process for each tab Pin
piyush_singh4-Nov-16 0:01
piyush_singh4-Nov-16 0:01 
GeneralRe: These browsers that have a separate process for each tab Pin
Daniel Wilianto4-Nov-16 17:44
Daniel Wilianto4-Nov-16 17:44 
GeneralRe: These browsers that have a separate process for each tab Pin
lopatir4-Nov-16 19:07
lopatir4-Nov-16 19:07 
GeneralRe: These browsers that have a separate process for each tab Pin
F-ES Sitecore3-Nov-16 3:31
professionalF-ES Sitecore3-Nov-16 3:31 
GeneralRe: These browsers that have a separate process for each tab Pin
Rob Philpott3-Nov-16 3:39
Rob Philpott3-Nov-16 3:39 
GeneralRe: These browsers that have a separate process for each tab Pin
Kornfeld Eliyahu Peter3-Nov-16 3:32
professionalKornfeld Eliyahu Peter3-Nov-16 3:32 
GeneralRe: These browsers that have a separate process for each tab Pin
Rob Philpott3-Nov-16 3:34
Rob Philpott3-Nov-16 3:34 
GeneralRe: These browsers that have a separate process for each tab Pin
Kornfeld Eliyahu Peter3-Nov-16 3:41
professionalKornfeld Eliyahu Peter3-Nov-16 3:41 
GeneralRe: These browsers that have a separate process for each tab Pin
Rob Philpott3-Nov-16 3:55
Rob Philpott3-Nov-16 3:55 
GeneralRe: These browsers that have a separate process for each tab Pin
Marc Clifton3-Nov-16 3:41
mvaMarc Clifton3-Nov-16 3:41 
GeneralRe: These browsers that have a separate process for each tab Pin
#realJSOP3-Nov-16 3:47
professional#realJSOP3-Nov-16 3:47 

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.