|
I honestly don't recall - but it's a site close to us both!
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
|
I like how your user name illustrates the fact that we are all just numbers in a government spreadsheet!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
We are all unique! Globally unique...
|
|
|
|
|
AspDotNetDev wrote: Globally unique.
Do you imply off-world dopplegangers ?
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
|
I am curious why that particular enterprise required drones to go above 400 ft.
|
|
|
|
|
|
Well done!
Get a copy of this: Expresso[^] - it's free, and it explains, tests and helps create regexes. I use it all the time and I wish I'd written it!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
OriginalGriff wrote: Get a copy of this: Expresso[^]
Just tried it out - And I hand-crafted my RegEx! Well, learning it from scratch has never caused any damage.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
The site OriginalGiff mentioned is very good. Another very helpful site is regexlib[^]; they have a large library of Regular Expressions. They also have a RegEx tester[^].
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
I second expresso it's an awesome tool!
|
|
|
|
|
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
You're welcome!
Good little tool, isn't it?
I was going to write one myself, but when I found this...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I endorse that. Expresso is a very good regex utility.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
modified 6-Feb-14 5:18am.
|
|
|
|
|
WTF??? I hate Trend. This is what I get when trying to download Expresso.
Trend Micro OfficeScan Event
URL Blocked
The URL that you are attempting to access is a potential security risk. Trend Micro OfficeScan has blocked this URL in keeping with the network security policy.
URL: http://www.ultrapico.com/ExpressoSetup3.msi
Risk Level: Dangerous
Details: Verified fraud page or threat source
|
|
|
|
|
Strange...I downloaded it here and ran a scan on the MSI and it showed nothing.
So I uploaded it to Dropbox: https://www.dropbox.com/s/3fwe3wtop741hpf/ExpressoSetup3.msi[^] - does that help?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Ah thanks. I'll grab it from home since DB is also blocked at work.
|
|
|
|
|
They are a friendly bunch, aren't they?
Do they allow you access to anything?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Yip, at least I can get onto CP, LOL.
No social sites, so I hope they don't investigate the full capabilities of CP
|
|
|
|
|
gack!
i suppose it's a right of passage everyone has to go through. but whew
me, i avoid regex like the plague. finite state machines are so much easier to understand and maintain.
|
|
|
|
|
I had a bit help from an experienced colleague
The challenge is that it validates a Syslog-Timestamp.
Problem? Yes. Here are some examples of valid timestamps:
2014-2-5T21:36:14.315Z-1.5
2014-2-5T21:36:14Z-1
2004-2-28T21:36:14.315Z+1.75
2004-2-29T21:36:14.315315Z+0
You see the problem
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Marco Bertschi wrote: it validates a Syslog-Timestamp
If it was written to some sort of log file by some application, why would you doubt it?
Edit: Now that I have perused the timestamp part of the RFC, I can state, "those are not valid timestamps".
This space intentionally left blank.
modified 5-Feb-14 17:31pm.
|
|
|
|
|
I am probably misinterpreting the RFC 5424 spec that you mentioned below and/or a case of complete RegEx ignorance, but from this site[^] it states that a timestamp can be a NILVALUE (where: NILVALUE = "-"). Do you account for this in your code?
|
|
|
|
|
You are right - The timestamp can be a NILVALUE!
The RegEx is used within the class SyslogTimestamp (see the discussion [^] why I don't use System.DateTime).
There is another class, called SyslogMessageHeader , which has a field of type SyslogTimestamp .
I plan to handle a NILVALUE as null, and also treat null objects as if they represent a NILVALUE.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|