1XML::LibXML::RegExp(3)User Contributed Perl DocumentationXML::LibXML::RegExp(3)
2
3
4

NAME

6       XML::LibXML::RegExp - XML::LibXML::RegExp - interface to libxml2
7       regular expressions
8

SYNOPSIS

10         use XML::LibXML;
11         my $compiled_re = XML::LibXML::RegExp->new('[0-9]{5}(-[0-9]{4})?');
12         if ($compiled_re->isDeterministic()) { ... }
13         if ($compiled_re->matches($string)) { ... }
14
15         $compiled_re = XML::LibXML::RegExp->new( $regexp_str );
16         $bool = $compiled_re->matches($string);
17         $bool = $compiled_re->isDeterministic();
18

DESCRIPTION

20       This is a perl interface to libxml2's implementation of regular
21       expressions, which are used e.g. for validation of XML Schema simple
22       types (pattern facet).
23
24       new()
25             $compiled_re = XML::LibXML::RegExp->new( $regexp_str );
26
27           The constructor takes a string containing a regular expression and
28           returns a compiled regexp object.
29
30       matches($string)
31             $bool = $compiled_re->matches($string);
32
33           Given a string value, returns a true value if the value is matched
34           by the compiled regular expression.
35
36       isDeterministic()
37             $bool = $compiled_re->isDeterministic();
38
39           Returns a true value if the regular expression is deterministic;
40           returns false otherwise. (See the definition of determinism in the
41           XML spec (<http://www.w3.org/TR/REC-xml/#determinism>))
42

AUTHORS

44       Matt Sergeant, Christian Glahn, Petr Pajas
45

VERSION

47       2.0204
48
50       2001-2007, AxKit.com Ltd.
51
52       2002-2006, Christian Glahn.
53
54       2006-2009, Petr Pajas.
55

LICENSE

57       This program is free software; you can redistribute it and/or modify it
58       under the same terms as Perl itself.
59
60
61
62perl v5.30.1                      2020-03-18            XML::LibXML::RegExp(3)
Impressum