public PeriodFormatterBuilder appendPrefix(String[] regularExpressions, String[] prefixes) {
        if (regularExpressions == null || prefixes == null ||
                regularExpressions.length < 1 || regularExpressions.length != prefixes.length) {
            throw new IllegalArgumentException();
        }
        return appendPrefix(new RegExAffix(regularExpressions, prefixes));
    }
public PeriodFormatterBuilder appendPrefix ( String [ ] regularExpressions , String [ ] prefixes ) { if ( regularExpressions == null || prefixes == null || regularExpressions . length < 1 || regularExpressions . length != prefixes . length ) { throw new IllegalArgumentException ( ) ; } return appendPrefix ( new RegExAffix ( regularExpressions , prefixes ) ) ; }
Append a field prefix which applies only to the next appended field.
If the field is not printed, neither is the prefix.
<p>
The value is converted to String. During parsing, the prefix is selected based
on the match with the regular expression. The index of the first regular
expression that matches value converted to String nominates the prefix. If
none of the regular expressions match the value converted to String then the
last prefix is selected.
<p>
An example usage for English might look like this:

<pre>
appendPrefix(new String[] { &quot;&circ;1$&quot;, &quot;.*&quot; }, new String[] { &quot; year&quot;, &quot; years&quot; })
</pre>

<p>
Please note that for languages with simple mapping (singular and plural prefix
only - like the one above) the {@link #appendPrefix(String, String)} method
will produce in a slightly faster formatter and that
{@link #appendPrefix(String[], String[])} method should be only used when the
mapping between values and prefixes is more complicated than the difference between
singular and plural.

@param regularExpressions  an array of regular expressions, at least one
element, length has to match the length of prefixes parameter
@param prefixes  an array of prefixes, at least one element, length has to
match the length of regularExpressions parameter
@return this PeriodFormatterBuilder
@throws IllegalStateException if no field exists to append to
@see #appendPrefix
@since 2.5