code: public static Range rangeOf(final String beginToken, final String endToken,
              final String string, final int fromIndex)
     {
        int begin = string.indexOf(beginToken, fromIndex);
  
        if (begin != -1)
        {
           int end = string.indexOf(endToken, begin + 1);
           if (end != -1)
           {
              return new Range(begin, end);
           }
        }
  
        return null;
     }
docs: Return the range from a begining token to an ending token.
  
  @param beginToken String to indicate begining of range.
  @param endToken String to indicate ending of range.
  @param string String to look for range in.
  @param fromIndex Beginning index.
  @return (begin index, end index) or <i>null</i>.