package mparser

  1. Overview
  2. Docs



val match_regexp : t -> int -> Regexp.t -> Regexp.substrings option

match_regexp s pos rex matches the regular expression rex against the characters in s starting at position pos. It returns Some substrings if the match succeeds, where substrings contains the matched substrings. If the match fails or if pos is not a valid position in s, it returns None.

It is not guaranteed that rex is matched against the complete substream starting at the current position. The min_rspace parameter of MParser_Char_Stream.from_channel specifies the minimum number of characters avaliable for matching.