Programming Challenge
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :O
If that's so, I also have a few great ones. How good are you with HLSL and neural nets? :)
I'm invincible, I can't be vinced
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
This is, obviously, just to check out how clever you are
And this obviously, a very easy programming question with a simple negative lookahead which both C# and Javascript support. Best fit for Quick Answers Forum IMO.
A year spent in artificial intelligence is enough to make one believe in God
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
I for one find this amusing and tried to save you from the one-voters. Anyway, my answer would be:
<[^:Wh]+Tables\(\"(.~(Data>))*\"\)
Maxx deserves the univote for the
snd codz
request and in the Lounge. you should get the 5 (assuming this works). I vote for neither...Never underestimate the power of human stupidity RAH
-
Maxx deserves the univote for the
snd codz
request and in the Lounge. you should get the 5 (assuming this works). I vote for neither...Never underestimate the power of human stupidity RAH
He did mark it as a coding challenge and if I recall correctly that makes it Lounge safe ;) I know the last sentence makes it all a bit suspicious, but since this is not his first day here, I am willing to give him the benefit of the doubt. Plus AspDotNetDev hasn't posted any puzzles recently and this was somewhat of a substitute :)
-
He did mark it as a coding challenge and if I recall correctly that makes it Lounge safe ;) I know the last sentence makes it all a bit suspicious, but since this is not his first day here, I am willing to give him the benefit of the doubt. Plus AspDotNetDev hasn't posted any puzzles recently and this was somewhat of a substitute :)
I still reckon it is a dodge, he's just trying to wriggle out of posting in the Q&A forum, especially with the snd codz. Bah humbug I say, wheres my single stick!
Never underestimate the power of human stupidity RAH
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Sorry, but this belongs either in Q&A or the regex forum. Making it a 'Programming Challenge' is just a con, let's face it.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
-
Maxx deserves the univote for the
snd codz
request and in the Lounge. you should get the 5 (assuming this works). I vote for neither...Never underestimate the power of human stupidity RAH
-
_Maxxx_ wrote:
This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :O
If that's so, I also have a few great ones. How good are you with HLSL and neural nets? :)
I'm invincible, I can't be vinced
I used to be good with neural nets, but use neural rods these days.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
_Maxxx_ wrote:
This is, obviously, just to check out how clever you are
And this obviously, a very easy programming question with a simple negative lookahead which both C# and Javascript support. Best fit for Quick Answers Forum IMO.
A year spent in artificial intelligence is enough to make one believe in God
I think I know your brother, Seymour.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
I for one find this amusing and tried to save you from the one-voters. Anyway, my answer would be:
<[^:Wh]+Tables\(\"(.~(Data>))*\"\)
Thanks, I can't try it right now as I am too upset over those nasty univoters. Maybe I'll cop a strop and leave ... Well, maybe not.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Maxx deserves the univote for the
snd codz
request and in the Lounge. you should get the 5 (assuming this works). I vote for neither...Never underestimate the power of human stupidity RAH
Ohhhh but you're cruel and heartless!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
He did mark it as a coding challenge and if I recall correctly that makes it Lounge safe ;) I know the last sentence makes it all a bit suspicious, but since this is not his first day here, I am willing to give him the benefit of the doubt. Plus AspDotNetDev hasn't posted any puzzles recently and this was somewhat of a substitute :)
To be absolutely honest, this was a genuine problem I had that I had been toying with for half an hour (I don't know raged from regie Perrin) and was going to Q&A it, then thought that it might be a good coding challenge for the regicides amongst you. I thought lounge posting it may evoke a humorous response - though judging by the quality of some of the recent jokes, the funny-bone of some members is in need of a splint!!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Sorry, but this belongs either in Q&A or the regex forum. Making it a 'Programming Challenge' is just a con, let's face it.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
No need to apologize. There's a regex foruml I never even thought to look!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
No need to apologize. There's a regex foruml I never even thought to look!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
It's called Regular Expressions :laugh:
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
-
I for one find this amusing and tried to save you from the one-voters. Anyway, my answer would be:
<[^:Wh]+Tables\(\"(.~(Data>))*\"\)
it flippin' well works, too! you beauty! found meself 30 occurrences in 1511 files - probably saved me an age in looking and missing some! Thanks - please add 5 to your kitty of CP Points - hopefully they will be worth something one day and you can trade them in for something useful!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Write a regular expression, suitable for the Search option in VS2010, that will find all occurrences of xxxTables("yyy") where xxx is any string of any length yyy is any string of any length that does not end with 'data' e.g. it should find ds.Tables("myTable") but not ds.Tables("myTableData") This is, obviously, just to check out how clever you are - and not because this is something i need to do in a current project :-O
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
Write a regular expression
I(Loathe)[regular expression]{syntax} Marc
My Blog
An Agile walk on the wild side with Relationship Oriented Programming
Melody's Amazon Herb Site -
To be absolutely honest, this was a genuine problem I had that I had been toying with for half an hour (I don't know raged from regie Perrin) and was going to Q&A it, then thought that it might be a good coding challenge for the regicides amongst you. I thought lounge posting it may evoke a humorous response - though judging by the quality of some of the recent jokes, the funny-bone of some members is in need of a splint!!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
No need to apologize. There's a regex foruml I never even thought to look!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Yes, had it for a while and it needs more traffic.