|laziness, impatience, and hubris
Re: Calling all REGEX Gurus - nasty problem involving regular expressions combined with hash keys - I need ideas as to how to even approach the problemby dd-b (Monk)
|on Feb 09, 2013 at 22:20 UTC
So, if you don't have bagged samples of what they send, you can't validate for sure any hypothetical solution. They really can't send you a list of exactly what they send in each situation?
If you do have examples, you can make a table from them them.
Therefore, you can put the ones you've got samples of (which will be the common ones) in a table, and make guesses on the key words that will be kept from the middle of the response codes for the ones you don't have samples of. You can make sure that your guesses don't give false positives on any of the common responses. And make sure you have logging that will show you anything you get that isn't in your list of expected returns, so you can figure out what's going on and update your tables. This isn't excellent, but might be tolerable?