### Question:
RegExHelper { @Nonnull public static Matcher getMatcher (@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue) { ValueEnforcer.notNull (sValue, "Value"); return RegExCache.getPattern (sRegEx).matcher (sValue); } private  RegExHelper(); @Nonnull static String [] getSplitToArray(@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx); @Nonnull static String [] getSplitToArray(@Nullable final CharSequence sText,
                                           @Nonnull @RegEx final String sRegEx,
                                           @Nonnegative final int nLimit); @Nonnull static ICommonsList <String> getSplitToList(@Nullable final CharSequence sText, @Nonnull @RegEx final String sRegEx); @Nonnull static ICommonsList <String> getSplitToList(@Nullable final CharSequence sText,
                                                      @Nonnull @RegEx final String sRegEx,
                                                      @Nonnegative final int nLimit); @Nonnull static Matcher getMatcher(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue); @Nonnull static Matcher getMatcher(@Nonnull @RegEx final String sRegEx, @Nonnegative final int nOptions, @Nonnull final String sValue); static boolean stringMatchesPattern(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue); static boolean stringMatchesPattern(@Nonnull @RegEx final String sRegEx,
                                              @Nonnegative final int nOptions,
                                              @Nonnull final String sValue); @Nonnull static String stringReplacePattern(@Nonnull @RegEx final String sRegEx,
                                             @Nonnull final String sValue,
                                             @Nullable final String sReplacement); @Nonnull static String stringReplacePattern(@Nonnull @RegEx final String sRegEx,
                                             @Nonnegative final int nOptions,
                                             @Nonnull final String sValue,
                                             @Nullable final String sReplacement); @Nullable static String getAsIdentifier(@Nullable final String s); @Nullable static String getAsIdentifier(@Nullable final String s, final char cReplacement); @Nullable static String getAsIdentifier(@Nullable final String s, @Nonnull final String sReplacement); static boolean isValidPattern(@Nonnull @RegEx final String sRegEx); @Nullable static String [] getAllMatchingGroupValues(@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue);  }### Answer:
@Test public void testGetMatcher () { final Matcher m = RegExHelper.getMatcher ("Hallo (\\d+)\\.(\\d+) Welt", "This is Hallo 2.3 Welt Text"); assertNotNull (m); assertEquals (2, m.groupCount ()); { m.reset (); final StringBuffer sb = new StringBuffer (); assertTrue (m.find ()); assertEquals ("Hallo 2.3 Welt", m.group (0)); m.appendReplacement (sb, "<$1.$2>"); assertFalse (m.find ()); m.appendTail (sb); assertEquals ("This is <2.3> Text", sb.toString ()); } { m.reset (); final StringBuffer sb = new StringBuffer (); assertTrue (m.find ()); assertEquals ("2", m.group (1)); assertEquals ("3", m.group (2)); m.appendReplacement (sb, "4"); m.appendTail (sb); assertEquals ("This is 4 Text", sb.toString ()); } { m.reset (); assertEquals ("This is <2.3> Text", m.replaceAll ("<$1.$2>")); } }