sig
  type regexp = CamomileLibrary.URe.regexp
  val regexp : string -> CamomileLibrary.UReStr.Interface.regexp
  val quote : string -> string
  val regexp_string : string -> CamomileLibrary.UReStr.Interface.regexp
  module type Type =
    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.UReStr.Interface.regexp ->
        CamomileLibrary.UReStr.Interface.Type.compiled_regexp
      val regexp_match :
        ?sem:CamomileLibrary.URe.match_semantics ->
        CamomileLibrary.UReStr.Interface.Type.compiled_regexp ->
        CamomileLibrary.UReStr.Interface.Type.text ->
        CamomileLibrary.UReStr.Interface.Type.index ->
        CamomileLibrary.UReStr.Interface.Type.SubText.t option array option
      val string_match :
        CamomileLibrary.UReStr.Interface.Type.compiled_regexp ->
        CamomileLibrary.UReStr.Interface.Type.text ->
        CamomileLibrary.UReStr.Interface.Type.index -> bool
      val search_forward :
        ?sem:CamomileLibrary.URe.match_semantics ->
        CamomileLibrary.UReStr.Interface.Type.compiled_regexp ->
        CamomileLibrary.UReStr.Interface.Type.text ->
        CamomileLibrary.UReStr.Interface.Type.index ->
        CamomileLibrary.UReStr.Interface.Type.SubText.t option array option
    end
  module Make :
    functor (Text : UnicodeString.Type->
      sig
        type text = Text.t
        type index = Text.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 : regexp -> compiled_regexp
        val regexp_match :
          ?sem:URe.match_semantics ->
          compiled_regexp -> text -> index -> SubText.t option array option
        val string_match : compiled_regexp -> text -> index -> bool
        val search_forward :
          ?sem:URe.match_semantics ->
          compiled_regexp -> text -> index -> SubText.t option array option
      end
end