|
I didn't found RegEx to be too hard, after finding out the basic principles at least. It's the same as with every new thing: Learning by doing!
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
I think this site is the best tutorial/guide to regular expressions:
http://www.regular-expressions.info/tutorial.html
Clear descriptions of everything from simple to complex.
---
I like this site for testing expressions:
http://www.regexr.com/
It's an online testing tool (plus a downloadable version if you like). Paste in your expression, paste in your text, see where it matches, with analysis, hover over matches to see groups.
|
|
|
|
|
You can probably compress it a little. If you are matching a single character, then you don't need []:
[0] => 0
[:] => :
[0][1][0-2][\.]? => 01[0-2]\.?
.? I think needs to be quoted where you mean ".": . => \.?
Also, you can often use meta characters to save some finger work:
[0-9] => \d
[0-9]{4} => \d{4}
Also, some of the expressions don't need to be bracketed:
([0-9]{4}) => \d{4}
You only need the brackets if you want the parser to be able to treat it as a unit in larger ops.
Just some ideas. Nice work though!
|
|
|
|
|
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"
|
|
|
|
|
Has any looked at the MSDN pricing lately?
I do some MS Office (excel) integration for my customers so it requires that I get their version of MS Office (all the versions; 97 to 2013) to program against. To have access to Office I need to upgrade from the MSDN Pro to MSDN Premium... which costs $5000 more!
Can anyone explain to me how they can justify charging developers $5000 to integrate with their products? I'm not writing the president's speeches using these installs. I'm writing software so my customers will continue to use MS products and purchase licenses.
I don't understand. What am I missing... besides the money to do it?
Joel Palmer
Data Integration Engineer
|
|
|
|
|
Nope, you didn't miss anything, it's the money.
It was broke, so I fixed it.
|
|
|
|
|
Joel Palmer wrote: I don't understand. What am I missing...
It's MS missing common sense.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Joel Palmer wrote: how they can justify charging developers $5000 It's called business.
Veni, vidi, abiit domum
|
|
|
|
|
You've missed the point. Developers are MS life blood. If I'm buying a MSDN subscription then I'm a pretty serious developer. As a developer I keep my customers coming back for more when I meet their requirements and if I do that using MS technology then the customers buy more MS licenses.
Good business would be to let developers increase the MS bottom line by having them using more MS products in their solutions. Pricing their products out of a developer's solutions does not make any business sense.
Joel Palmer
Data Integration Engineer
|
|
|
|
|
You are making a couple of faulty assumptions: that MS care about developers, and the MS care about end users. They don't: they care about money. And the large companies they expect to sell the top-end product to will just pay up and move on, because it isn't the people signing the purchase order's money. While there are people who will pay it, they will continue to gouge charge.
Have to considered buying second hand copies of office on FleaBay to complete your collection that way, probably cost less than $500 for the lot...
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: You are making a couple of faulty assumptions: that MS care about developers, and the MS care about end users. Er, no, I didn't make those assumptions anywhere.
Veni, vidi, abiit domum
|
|
|
|
|
I know you didn't.
But I think Joel did...
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 – ∞)
|
|
|
|
|
Not true. Developers are the lifeblood of MSFT and we create the ecosystem from which they generate $billions of profit. Unfortunately, they do not understand the developer community. If they did, they would have free MSDN licenses for individual developers and charge for corporate licenses for those who develop commercial products. Developers like me generate huge revenues and profits for MSFT through SQL Server, Office, Azure, etc. licenses yet we have to pay dearly for the privilege (Visual Studio license fees, MSDN subscription, TFS, training fees and alike). It is just sad.
|
|
|
|
|
John Korondy wrote: Not true. What's not true? I think maybe this reply belongs somewhere else.
Veni, vidi, abiit domum
|
|
|
|
|
I agree with your conclusions but I don't agree that they don't care.
MS is made up of a bunch of developers and we're developers. I think that's just a brash and over-extended generalization. Unless you're saying that you don't care about the work you do and you suspect that all developers are the same way. Just like the company I work for, they are priced at "what the market will bare".
However, I do agree that its because we generally aren't the one filling the PO. Because we are one step removed they tend to get away with over-inflating their value. I'm just saying that it doesn't make business or logical sense that they'd price it with this much excess.
Yes, Fleabay is likely my next step. Got a copy of MS Office 97 for sale?
Joel Palmer
Data Integration Engineer
|
|
|
|
|
|
You must be a joy to have as a co-worker. Oh no! Its 1/100ths empty. Evidentially you've never written code in Notepad.
Joel Palmer
Data Integration Engineer
|
|
|
|
|
Just a realist when it comes to MS: I got fed up with Beta testing on DOS because they never listened to feedback even then.
Joel Palmer wrote: Evidentially you've never written code in Notepad.
I've done worse: EDLIN[^]
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: I've done worse: EDLIN[^]
And you can still go back[^]
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Thank you for that generous offer, but I will reluctantly have to decline.
And I typed that with a straight face! I'm getting better at not swearing at people.
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: Edlin
That would make a great Hipster's baby's name.
|
|
|
|
|
Man up! Use Vi
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Vi? Of course, we 'ad it 'ard.
We used to get up in 't morning, scrape some electrons off the clouds, put them into the right addresses on 't chips one at a time.
The only way we knew it were working were if the gaffer didn't rip the roof off our shed and drive us out wit' steam hose.
|
|
|
|
|
Chips? CHIPS!? You were lucky!
We had melt sand in t'furnace - I say 'furnace', it were a lump o' coal being blown on by t' wife, and make us ain valves, t' plug togevva wit' wire we 'ad t' make oot o' fillings from our ain teef!
But ye tell t' kids of today, an' they won't believe you!
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Teeth?
We used to dream of having teeth. They gave a pound of Tofu every month, and that was between seven of us! We had to suck it off the boss's doormats before letting out the Tartary Apes he used as Code Monkeys. And when they made mistakes, he'd beat us to death with Billy Gates' spectacle case.
|
|
|
|