@Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;
      Substitution that = (Substitution) o;
      return new EqualsBuilder()
        .append(caseInsensitiveUser, that.caseInsensitiveUser)
        .append(pattern, that.pattern)
        .append(replacement, that.replacement)
        .append(modifier, that.modifier)
        .isEquals();
    }
I'm the substitution part of an auth-to-local rule.
I have 4 parts:
 s/pattern/replacement/g/L where the last 2 parts are optional.
The pattern part of this expression is a regular expression used to find the portion of the string to replace.
The replacement part of this expression is the value to use for replacing the matched section.
If g is specified after the last /, the replacements will occur for every match in the value, else only the first match is processed.
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java