sig
  type text
  type index
  type compiled_regexp
  module SubText :
    sig
      type t
      val get : t -> int -> UChar.t
      val init : int -> (int -> UChar.t) -> t
      val length : t -> int
      type index
      val look : t -> index -> UChar.t
      val nth : t -> int -> index
      val first : t -> index
      val last : t -> index
      val next : t -> index -> index
      val prev : t -> index -> index
      val move : t -> index -> int -> index
      val out_of_range : t -> index -> bool
      val compare_index : t -> index -> index -> int
      val iter : (UChar.t -> unit) -> t -> unit
      val compare : t -> t -> int
      module Buf :
        sig
          type buf
          val create : int -> buf
          val contents : buf -> t
          val clear : buf -> unit
          val reset : buf -> unit
          val add_char : buf -> UChar.t -> unit
          val add_string : buf -> t -> unit
          val add_buffer : buf -> buf -> unit
        end
      type ur_text = text
      type ur_index = index
      val refer : ur_text -> ur_index -> ur_index -> t
      val excerpt : t -> ur_text
      val context : t -> ur_text * ur_index * ur_index
      val ur_index_of : t -> index -> ur_index
    end
  val compile :
    CamomileLibrary.Type.URe.regexp ->
    CamomileLibrary.Type.URe.Type.compiled_regexp
  val regexp_match :
    ?sem:CamomileLibrary.Type.URe.match_semantics ->
    CamomileLibrary.Type.URe.Type.compiled_regexp ->
    CamomileLibrary.Type.URe.Type.text ->
    CamomileLibrary.Type.URe.Type.index ->
    CamomileLibrary.Type.URe.Type.SubText.t option array option
  val string_match :
    CamomileLibrary.Type.URe.Type.compiled_regexp ->
    CamomileLibrary.Type.URe.Type.text ->
    CamomileLibrary.Type.URe.Type.index -> bool
  val search_forward :
    ?sem:CamomileLibrary.Type.URe.match_semantics ->
    CamomileLibrary.Type.URe.Type.compiled_regexp ->
    CamomileLibrary.Type.URe.Type.text ->
    CamomileLibrary.Type.URe.Type.index ->
    CamomileLibrary.Type.URe.Type.SubText.t option array option
end