I don’t think I’ve seen this anywhere, so I’ll present a “Best Practice” of mine regarding RegEx.
Out here where I work (Taiwan), there seems to be a amazing lack of IT workers fluent with RegEx. Often when RegEx is used in services (or TN Doc Attrib queries for that matter), I have to worry about two things: 1) person(s) taking over maintenance of service might not understand (totally or partially) what I’m trying to achieve with particular RegEx; or 2) Somebody with better understanding of RegEx might spot what he/she thinks is an error, but cannot be sure.
To alleviate the problems, I always ask our developers to Comment their services, especially for RegEx.
Which comes back to why I’m writing this. Just nitpicking (but could be an important difference to some applications) Fred’s example of /^ *$/. Since Fred said what he was trying to achieve, it let me spot something: the example will match variable number of spaces, included zero(0) spaces, AKA empty-string. What we want to match is one (1) or more spaces, which would be /^ +$/
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods