void () { RegexFacade regex = RegexFacade.regex("([0-9]+):([0-9]+)"); StringWithId string = new StringWithId("12:00pm"); MatchData match = regex.match(string, null); assertEquals(new TextMateRange(0, 5), match.codePointRange(string.bytes)); assertEquals(new TextMateRange(0, 2), match.codePointRange(string.bytes, 1)); assertEquals(new TextMateRange(3, 5), match.codePointRange(string.bytes, 2)); }