I don't think so.
Regular expressions have many uses. However finding one regex the is good for every possible scenario for the type of data the regex is matching is daunting.
Recently Justin Rogers used one of my creations ,my datetime regex, as a negative example to try to prove a point. While I used it a couple of times as one of several examples for a different discussion, he chose to focus on this one. In defense of my expression I really can't say I understand the points he's trying to make in regards to the regex or why he’s making the assumptions he's basing them on. He argues because of it size and complexity its usefulness comes in questions. Now you could say the same thing about Microsoft Word. Most people don't use features of Word that exceed what Wordpad offers. MS Word has feature most of it users will never use or even learn about. Does that diminish its usefulness? Unlike Justin I've made no assumptions on how or why someone else will want to use this regex. I have several scenarios where I might have a use for it, and I wrote it to include the criteria I know I want or think I might want later but I wouldn't in my wildest dreams think everyone would want to use it exactly the same way I would. If that happened it would be eerie. How useful something is depends on the situation it will be used in. A hammer is a useful tool if you are driving nails, not so much if you are sawing wood. If you are working with a language that has strong date handing or at least enough to satisfy your needs you may have no need for this regex however if that isn't the case this regex may be just what the doctor ordered or a let a very good jumping off point. Furthermore I didn't write this regex, take over the world, and declare all must use my regex. I wrote it just as much to be a modifiable example of what you could do with a regex and how certain syntax could be applied as I wrote it for actual application. You may learn something just from looking at the construction of this regex even if you never actually use it. Whether or not you use this expression should be based on what your needs are. If it exceeds what you need you may wish to simplify it or choose something else. It was never intended to be everything for everybody. The regex’s range is intentionally broad. You may never need its full scope, in fact you never will use it but that's not the point. It’s there to use if you need to use it and is allow the maximum flexibility. You can restrict its range and loosen it strictness if that’s what you need from it. Y2k should have shown starting out with the minimum then expanding is not always a simple task.
Another point he tried to make was user feedback using this regex. I don't know what this has to do with the price of tea in China. First off who is “the user”? The person using the regex or the person using the application that uses the regex? If he's referring to the former the most I can do as the author of a regex or code snippet or application is to supply documentation of how I intended for it to work. I've provided a description, examples and in several cases links to more information on what’s being checked. Beyond that it's up to the person using it to make use of that information. I can try my best to communicate what the purpose of a regex is but no matter how much information I provide I can’t make anyone look at it or ensure they will interpret it correctly. I've seen several cases of people complaining a regex not working for a case that doesn't match its described use, such as an IP matching regex not matching an email mailbox. Now if the user didn’t read the description, didn’t know what an IP address was or didn’t know what the difference between the two I don’t see how that falls on the author. If you are ignorant of what something does you are better of not using it unless you are willing to learn about it. That doesn't just apply to programming but life in general. I would no more suggest using a regex that you didn't know what it was checking than I would suggest you go down to the nuclear power plant and press all the buttons just to see what happens. You should know what your tools do if you plan to use them. Now if “user” refer to the end user, let me just say that I've never seen any sentient code that knows what the programmer/developer/designer meant for it to do and on its own wrote error messages for every possible bad input. Just as I have never seen a regex testing program explain me why my input didn't match a regex I or someone else wrote. Feedback is solely at the desecration of the creator(s) of the application or function. Whether you use a regex, a function or tea leaves validate the data or match a patterns feedback is a separate issue. Even if you just use the regex to return true or false ,which isn't all you could you it for, there is nothing stopping you from giving a simple error message like “bad date” or a complex message consisting of a three paragraph discussion on the history of calendar reform. Other than testing I have no idea of why you would have a regex sit on an island. If the user is testing this regex and thinks a value should pass and it doesn't they may think your code is broken. That may be true and maybe your code is wrong. But that is something the user will need to determine. If they think you are wrong they need to verify they were right. If someone thinks they are always right well they’re just delusional. If they merely assume they are right and seek or create something that agrees with what think then they will be accepting bad data. I had several people incorrectly tell me what qualified as a leap year and that my regex fail their assumptions. The fact they thought they were right didn't in any way redefine the actual leap years rule. If a user needs something that accurately validates leap years they need to know what that entails.
Finally the assertions that you could write a coded equivalent in fewer characters than the regex uses is presumptuous and relative. Whether or not that was true would depend on at least two factors. The language being used and the skill level of the person using it. Anybody can write inefficient code. Not every can write good tight code. The complexity of the language would also be a factor of how many or how few characters you need. Why he is even counting character is beyond me since he's been arguing for writing more verbose regexes with simpler syntax rather than write shorter expression with advanced syntax. Now we are character counting? You can write code for anything you would write a regex for. Some case code is better sometimes it not but either way the choice of what is best used is that of the person using it.