code: protected String replace(CharSequence text, boolean firstOnly){
  		StringBuilder sb = new StringBuilder();
  		AutomatonMatcher am = runAutomation.newMatcher(text);
  		int lastEnd = 0;
  		while (am.find() && (firstOnly == false || lastEnd == 0)){
  			sb.append(text, lastEnd, am.start());
  			lastEnd = am.end();
  			sb.append(replacement);
  		}
  		sb.append(text, lastEnd, text.length());
  		return sb.toString();
  	}
docs: Do replacement.<br>
  进行替换。
  
  @param text	The original String.<br>替换前的原始字符串。
  @param firstOnly		If true, then only do replacement upon the first occurrence;
  otherwise, replace in all the occurrences.<br>
  如果为true则只替换第一个出现的地方，否则全部替换。
  @return		The String after substitution; If no match found, the same String as the input one will be returned.<br>
  替换后的结果；如果没有发生替换，则结果与原来输入的字符串完全相同。