-USING: help.markup help.syntax sequences strings ;
+USING: help.markup help.syntax math sequences strings ;
IN: pcre
ARTICLE: "pcre" "PCRE binding"
}
} ;
+HELP: version
+{ $values { "f" float } }
+{ $description "Version number of the PCRE library, expressed as a float." } ;
+
ABOUT: "pcre"
! This used to work in 8.36, but might have changed in later versions.
! See: https://bugs.exim.org/show_bug.cgi?id=1875
-pcre_version " " splitting:split1 drop string>number 8.36 <= [
+version 8.36 <= [
{ t t } [
"(?s)." <compiled-pcre> PCRE_DOTALL has-option?
"(?i)x" <compiled-pcre> PCRE_CASELESS has-option?
-! Copyright (C) 2013 Björn Lindqvist
+! Copyright (C) 2013, 2016 Björn Lindqvist
! See http://factorcode.org/license.txt for BSD license
USING: accessors alien alien.accessors alien.c-types alien.data
alien.enums alien.strings arrays assocs combinators fry
io.encodings.string io.encodings.utf8 kernel literals math
-math.bitwise pcre.ffi sequences splitting strings ;
+math.bitwise math.parser pcre.ffi sequences splitting strings ;
QUALIFIED: regexp
IN: pcre
: split ( subject obj -- strings )
dupd findall [ first second ] map split-subseqs ;
+
+: version ( -- r )
+ pcre_version " " splitting:split1 drop string>number ;