> почему этот код должен возвращать 2 а не 1? Сие есть секрет. Почему-то всегда возвращает на 1 больше, чем съедено символов, да. Кто может здесь знать? @agladysh?
The matching function. It attempts to match the given pattern against the subject string. If the match succeeds, returns the index in the subject of the first character after the match, or the captured values (if the pattern captured any value).