Click here to Skip to main content
15,908,841 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: Regular Expression - Achievement unlocked Pin
Thornik6-Feb-14 0:24
Thornik6-Feb-14 0:24 
GeneralRe: Regular Expression - Achievement unlocked Pin
svella6-Feb-14 3:17
svella6-Feb-14 3:17 
GeneralRe: Regular Expression - Achievement unlocked Pin
Marco Bertschi6-Feb-14 3:29
protectorMarco Bertschi6-Feb-14 3:29 
GeneralRe: Regular Expression - Achievement unlocked Pin
TheFigmo6-Feb-14 4:34
TheFigmo6-Feb-14 4:34 
GeneralRe: Regular Expression - Achievement unlocked Pin
Marco Bertschi6-Feb-14 4:37
protectorMarco Bertschi6-Feb-14 4:37 
GeneralRe: Regular Expression - Achievement unlocked Pin
syspau6-Feb-14 7:52
syspau6-Feb-14 7:52 
GeneralRe: Regular Expression - Achievement unlocked Pin
Ralph Little6-Feb-14 7:56
Ralph Little6-Feb-14 7:56 
GeneralRe: Regular Expression - Achievement unlocked Pin
dpminusa6-Feb-14 22:37
dpminusa6-Feb-14 22:37 
One approach I have used with varying levels of utility is to treat the regex pattern like an algebraic expression. Factor out common terms and assign them to variables. Use replication counts, etc. This can simplify the final result and make it more maintainable.

Your pattern can be simplified a bit and made more readable somewhat by this. I found other strings like valid IP addresses can be greatly simplified this way.

Maybe this is useful to you!?
"Courtesy is the product of a mature, disciplined mind ... ridicule is lack of the same - DPM"

GeneralVisual Studio with MSDN Premium Pin
Joel Palmer5-Feb-14 7:41
Joel Palmer5-Feb-14 7:41 
GeneralRe: Visual Studio with MSDN Premium Pin
S Houghtelin5-Feb-14 7:50
professionalS Houghtelin5-Feb-14 7:50 
GeneralRe: Visual Studio with MSDN Premium Pin
Marco Bertschi5-Feb-14 7:51
protectorMarco Bertschi5-Feb-14 7:51 
GeneralRe: Visual Studio with MSDN Premium Pin
Richard MacCutchan5-Feb-14 7:54
mveRichard MacCutchan5-Feb-14 7:54 
GeneralRe: Visual Studio with MSDN Premium Pin
Joel Palmer5-Feb-14 7:59
Joel Palmer5-Feb-14 7:59 
GeneralRe: Visual Studio with MSDN Premium Pin
OriginalGriff5-Feb-14 8:03
mveOriginalGriff5-Feb-14 8:03 
GeneralRe: Visual Studio with MSDN Premium Pin
Richard MacCutchan5-Feb-14 8:08
mveRichard MacCutchan5-Feb-14 8:08 
GeneralRe: Visual Studio with MSDN Premium Pin
OriginalGriff5-Feb-14 8:10
mveOriginalGriff5-Feb-14 8:10 
GeneralRe: Visual Studio with MSDN Premium Pin
John Korondy5-Feb-14 21:02
John Korondy5-Feb-14 21:02 
GeneralRe: Visual Studio with MSDN Premium Pin
Richard MacCutchan5-Feb-14 22:14
mveRichard MacCutchan5-Feb-14 22:14 
GeneralRe: Visual Studio with MSDN Premium Pin
Joel Palmer5-Feb-14 8:13
Joel Palmer5-Feb-14 8:13 
GeneralRe: Visual Studio with MSDN Premium Pin
OriginalGriff5-Feb-14 8:20
mveOriginalGriff5-Feb-14 8:20 
GeneralRe: Visual Studio with MSDN Premium Pin
Joel Palmer5-Feb-14 8:24
Joel Palmer5-Feb-14 8:24 
GeneralRe: Visual Studio with MSDN Premium Pin
OriginalGriff5-Feb-14 8:26
mveOriginalGriff5-Feb-14 8:26 
GeneralRe: Visual Studio with MSDN Premium Pin
Marco Bertschi5-Feb-14 8:54
protectorMarco Bertschi5-Feb-14 8:54 
GeneralRe: Visual Studio with MSDN Premium Pin
OriginalGriff5-Feb-14 9:05
mveOriginalGriff5-Feb-14 9:05 
GeneralRe: Visual Studio with MSDN Premium Pin
Ernst Iliov Stavro Blofeld5-Feb-14 9:00
Ernst Iliov Stavro Blofeld5-Feb-14 9:00 

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.