code: public static String map(SlingHttpServletRequest request, String value) {
          StringBuilder result = new StringBuilder();
          Matcher matcher = HREF_PATTERN.matcher(value);
          int len = value.length();
          int pos = 0;
          while (matcher.find(pos)) {
              String unmapped = matcher.group(3);
              String mapped = url(request, unmapped);
              result.append(value, pos, matcher.start());
              result.append(matcher.group(1));
              result.append(mapped);
              result.append(matcher.group(4));
              pos = matcher.end();
          }
          if (pos >= 0 && pos < len) {
              result.append(value, pos, len);
          }
          return result.toString();
      }
docs: Replaces all 'href' attribute values found in the text value by the resolver mapped value.
  
  @param request the text (rich text) value
  @param value   the text (rich text) value
  @return the transformed text value