package dune-private-libs
Private libraries of Dune
Install
Dune Dependency
Authors
Maintainers
Sources
dune-3.18.2.tbz
sha256=56be509ffc3c5ba652113d9e6b43edb04a691f1e1f6cbba17b9d243b1239a7af
sha512=ee04a0c4ab946817018c78cd9b19c8d3082ee3b1cef78c699fff4ea37fd79543823a9751d0b945d2fd1783396ceded045cbec986a85f7a8f7bac93e04650fff3
doc/dune-private-libs.dune_re/Dune_re/Posix/index.html
Module Dune_re.Posix
Source
References:
Example of how to use this module (to parse some IRC logs):
type msg = {
time:string;
author:string;
content:string;
}
let re = Core.compile (Re_posix.re "([^:].*:[^:]*:[^:]{2})<.([^>]+)> (.+)$")
(* parse a line *)
let match_line line =
try
let substrings = Core.exec re line in
let groups = Core.get_all substrings in
(* groups can be obtained directly by index within [substrings] *)
Some {time=groups.(1); author=groups.(2); content=groups.(3)}
with Not_found ->
None (* regex didn't match *)
Errors that can be raised during the parsing of the regular expression
Parsing of a Posix extended regular expression
compile r
is defined as Core.compile (Core.longest r)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>