code: public static boolean isValidPattern (@Nonnull @RegEx final String sRegEx)
    {
      try
      {
        Pattern.compile (sRegEx);
        return true;
      }
      catch (final PatternSyntaxException ex)
      {
        return false;
      }
    }
docs: Check if the passed regular expression is invalid.<br>
  Note: this method may be a performance killer, as it calls
  {@link Pattern#compile(String)} each time, which is CPU intensive and has a
  synchronization penalty.
  
  @param sRegEx
  The regular expression to validate. May not be <code>null</code>.
  @return <code>true</code> if the pattern is valid, <code>false</code>
  otherwise.