Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralRe: -ve ^2 Pinprofessional_Maxxx_5-Feb-14 22:14 
GeneralOutrageous government intervention (US) Pinmember{da7c68de-3931-43b9-9102-6dbe3972c5c3}5-Feb-14 10:55 
GeneralRe: Outrageous government intervention (US) PinprofessionalRichard Andrew x645-Feb-14 12:56 
GeneralRe: Outrageous government intervention (US) PinprotectorAspDotNetDev5-Feb-14 19:06 
GeneralRe: Outrageous government intervention (US) Pinprofessional_Maxxx_5-Feb-14 19:50 
GeneralRe: Outrageous government intervention (US) PinprofessionalglennPattonWork5-Feb-14 23:38 
GeneralRe: Outrageous government intervention (US) Pinmemberjschell6-Feb-14 8:52 
GeneralRegular Expression - Achievement unlocked PinprofessionalMarco Bertschi5-Feb-14 9:35 
I had the joy to take my first steps with Regular Expressions today (I have tried to avoid them, but I eventually got that they are absolutely inavoidable, especially when it comes to parsing complex strings).
So I present you my first RegEx:
 
([0-9]{4})-([1-9]|[1][0-2])-([0-2]?[0-9]|[3][0-1])[T]([0-1]?[0-9]|[2][0-3])[:]([0-5]?[0-9])[:]([0-5]?[0-9])?.?([0-9]{1,6})[Z]([+-][0-9][\.|,]?[0-9]?|[0-9]{2}?|[+-]?[0][1][0-2][\.]?[0-9]?|[0-9]{2}?)
 
Beautiful, isn't she? Blush | :O Blush | :O Blush | :O
 
And that's the string it will parse: 2014-2-5T21:36:14.315Z+1.5
Clean-up crew needed, grammar spill... - Nagy Vilmos

GeneralRe: Regular Expression - Achievement unlocked PinprotectorOriginalGriff5-Feb-14 10:12 
GeneralRe: Regular Expression - Achievement unlocked PinprofessionalMarco Bertschi5-Feb-14 10:16 
GeneralRe: Regular Expression - Achievement unlocked PinprofessionalBillW335-Feb-14 10:26 
GeneralRe: Regular Expression - Achievement unlocked PinmemberMike Hankey5-Feb-14 10:56 
GeneralThank you. Thank you. Thank you. PinprofessionalRajesh R Subramanian5-Feb-14 21:05 
GeneralRe: Thank you. Thank you. Thank you. PinprotectorOriginalGriff5-Feb-14 21:40 
GeneralRe: Regular Expression - Achievement unlocked [modified] PinmemberSeptimus Hedgehog5-Feb-14 21:25 
QuestionRe: Regular Expression - Achievement unlocked PinmemberMatthys Terblanche5-Feb-14 22:37 
AnswerRe: Regular Expression - Achievement unlocked PinprotectorOriginalGriff5-Feb-14 22:54 
GeneralRe: Regular Expression - Achievement unlocked PinmemberMatthys Terblanche5-Feb-14 22:59 
GeneralRe: Regular Expression - Achievement unlocked PinprotectorOriginalGriff5-Feb-14 23:03 
GeneralRe: Regular Expression - Achievement unlocked PinmemberMatthys Terblanche6-Feb-14 1:03 
GeneralRe: Regular Expression - Achievement unlocked PinmemberChris Losinger5-Feb-14 10:30 
GeneralRe: Regular Expression - Achievement unlocked PinprofessionalMarco Bertschi5-Feb-14 10:37 
GeneralRe: Regular Expression - Achievement unlocked [modified] PinmemberPIEBALDconsult5-Feb-14 10:59 
QuestionRe: Regular Expression - Achievement unlocked PinmemberTnTinMn5-Feb-14 12:23 
AnswerRe: Regular Expression - Achievement unlocked PinprofessionalMarco Bertschi5-Feb-14 20:01 

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
Web01 | 2.8.140821.2 | Last Updated 22 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid