code: public String replaceFirst(String pString, String pRegex, String pReplacement) {
          return Pattern.compile(pRegex).matcher(pString).replaceFirst(pReplacement);
      }
docs: Replaces the first substring of the given string that matches the given
  regular expression with the given pReplacement.
  <p/>
  An invocation of this method of the form
  <tt>replaceFirst(<i>str</i>, </tt><i>regex</i>, <i>repl</i>)</tt>
  yields exactly the same result as the expression
  <p/>
  <blockquote><tt>
  {@link Pattern}.{@link Pattern#compile compile}(<i>regex</i>).
  {@link Pattern#matcher matcher}(<i>str</i>).
  {@link java.util.regex.Matcher#replaceFirst replaceFirst}(<i>repl</i>)</tt></blockquote>
  
  @param pString      the string
  @param pRegex       the regular expression to which this string is to be matched
  @param pReplacement the replacement text
  @return The resulting {@code String}
  @throws PatternSyntaxException if the regular expression's syntax is invalid
  @see Pattern
  @see java.util.regex.Matcher#replaceFirst(String)