Click here to Skip to main content

Regular Expressions

 
Questioncan someone tell me whats wrong with this expression? [modified] PinmemberChekGuy29-Apr-12 11:48 
AnswerRe: can someone tell me whats wrong with this expression? Pinmemberegenis29-Apr-12 19:22 
AnswerRe: can someone tell me whats wrong with this expression? PinmemberPeter_in_278029-Apr-12 19:46 
QuestionEither start or not a "d" PinmemberBernhard Hiller6-Mar-12 0:50 
I try to get the date number format from a date format string. The date number format is - if present - either a single d or a double d. But the whole string can contain a place holder for the dayname also - ddd or dddd. How can I get the d or dd, if present?
I tried [^d](?<pattern>d{1,2})[^d] which works well with the standard German format (dddd, d. MMMM yyyy). But that fails when the daynumber comes first (say: d. dddd MMMM yyyy; here, ^(?<pattern>d{1,2})[^d] does the trick), and it fails when the daynumber comes last.
Actually I need something like a "either start of the string or not a d", i.e. ^|[^d] - but that does not work. How can that be solved?
AnswerRe: Either start or not a "d" PinmemberBernhard Hiller6-Mar-12 2:02 
QuestionTrying to match non-quoted sections [modified] PinmemberPIEBALDconsult24-Jan-12 4:30 
AnswerRe: Trying to match non-quoted sections PinmemberAndreas Gieriet7-Apr-12 4:33 
GeneralRe: Trying to match non-quoted sections PinmemberPIEBALDconsult7-Apr-12 9:17 
GeneralRe: Trying to match non-quoted sections PinmemberAndreas Gieriet7-Apr-12 11:04 
GeneralRe: Trying to match non-quoted sections PinmemberPIEBALDconsult9-Apr-12 18:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 14 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid