Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::libxml::regexp(3) [osx man page]

XML::LibXML::RegExp(3)					User Contributed Perl Documentation				    XML::LibXML::RegExp(3)

XML::LibXML::RegExp - XML::LibXML::RegExp - interface to libxml2 regular expressions SYNOPSIS
use XML::LibXML; my $compiled_re = XML::LibXML::RegExp->new('[0-9]{5}(-[0-9]{4})?'); if ($compiled_re->isDeterministic()) { ... } if ($compiled_re->matches($string)) { ... } $compiled_re = XML::LibXML::RegExp->new( $regexp_str ); $bool = $compiled_re->matches($string); $bool = $compiled_re->isDeterministic(); DESCRIPTION
This is a perl interface to libxml2's implementation of regular expressions, which are used e.g. for validation of XML Schema simple types (pattern facet). new() $compiled_re = XML::LibXML::RegExp->new( $regexp_str ); The constructor takes a string containing a regular expression and returns a compiled regexp object. matches($string) $bool = $compiled_re->matches($string); Given a string value, returns a true value if the value is matched by the compiled regular expression. isDeterministic() $bool = $compiled_re->isDeterministic(); Returns a true value if the regular expression is deterministic; returns false otherwise. (See the definition of determinism in the XML spec ( <>)) AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas VERSION
2001-2007, Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. perl v5.16.2 2012-10-22 XML::LibXML::RegExp(3)

Check Out this Related Man Page

XML::LibXML::XPathExpression(3) 			User Contributed Perl Documentation			   XML::LibXML::XPathExpression(3)

XML::LibXML::XPathExpression - XML::LibXML::XPathExpression - interface to libxml2 pre-compiled XPath expressions SYNOPSIS
use XML::LibXML; my $compiled_xpath = XML::LibXML::XPathExpression->new('//foo[@bar="baz"][position()<4]'); # interface from XML::LibXML::Node my $result = $node->find($compiled_xpath); my @nodes = $node->findnodes($compiled_xpath); my $value = $node->findvalue($compiled_xpath); # interface from XML::LibXML::XPathContext my $result = $xpc->find($compiled_xpath,$node); my @nodes = $xpc->findnodes($compiled_xpath,$node); my $value = $xpc->findvalue($compiled_xpath,$node); $compiled = XML::LibXML::XPathExpression->new( xpath_string ); DESCRIPTION
This is a perl interface to libxml2's pre-compiled XPath expressions. Pre-compiling an XPath expression can give in some performance benefit if the same XPath query is evaluated many times. "XML::LibXML::XPathExpression" objects can be passed to all "find..." functions "XML::LibXML" that expect an XPath expression. new() $compiled = XML::LibXML::XPathExpression->new( xpath_string ); The constructor takes an XPath 1.0 expression as a string and returns an object representing the pre-compiled expressions (the actual data structure is internal to libxml2). AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas VERSION
2001-2007, Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. perl v5.16.2 2012-10-22 XML::LibXML::XPathExpression(3)
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

RegExp question

Hi guys, does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp cheers (3 Replies)
Discussion started by: penfold
3 Replies

2. Shell Programming and Scripting

RegExp negative match not working

or I don't know how to make it work ... Hello im trying to build regexp that will match me single string or function call inside of brackets for example I have : <% myFunction("blah",foo) %> or <% myVar %> and not match : <% if(myFunction("blah",foo)==1) %> or <% while(myvar < 3){... (2 Replies)
Discussion started by: umen
2 Replies

3. UNIX for Dummies Questions & Answers


need regular expression matches: abc11_efg11_123.xml abc11_123.xml Thank you Andy (1 Reply)
Discussion started by: andy2000
1 Replies

4. Shell Programming and Scripting

Perl RegExp to remove last character from strings

I use SAS (a statistical software) and have to remove last character or the last 1/2 numbers that appear after characters from the string using Perl Regular Expression (which is recognized by SAS). Input: f183ii10 f183ii2 f182ii1 f182ii2 f183iim f22ii f22ii11 f22ii12 pmh4 pmhm Desired... (2 Replies)
Discussion started by: ospreyeagle
2 Replies

5. UNIX for Dummies Questions & Answers

RegExp - settle a bet

A couple co-workers have a disagreement. Can you guys please settle this? One co-worker says regular expressions can inherently search and replace. His argument is that he can do a s/ regexp / replace in perl (and many other languages). The other says that by definition regular expressions... (2 Replies)
Discussion started by: earnstaf
2 Replies

6. Shell Programming and Scripting

XML Problem

Hello, I need a script to edit a custom XML, although I know it should be fairly easy to create such a script, I'm failing miserably. The script should be able to read from a file containing the ids of one tag of the xml (<content contentid="XXX".... for example) and then remove this content. For... (5 Replies)
Discussion started by: Zarnick
5 Replies

7. UNIX for Dummies Questions & Answers

Need to Call Web Service from Unix

I'm a Unix and C programming newbie, and I've been tasked with calling a web service from a legacy Unix app... I've come across libxml2 and libsoup, gnome's libraries for XML/SOAP processing... But I'm seeking guidance on the development process... :o (0 Replies)
Discussion started by: jahooper
0 Replies

8. Ubuntu


Hi again, I use Ubuntu 8.10. I could not install xml-config. Although libxml2-dev is installed, ./configure cannot find xml-config. Help me out please... apprentice (7 Replies)
Discussion started by: apprentice
7 Replies

9. Shell Programming and Scripting

...yet another string of awk/sed questions from a RegExp-Challenged luser %-\

Greetings all, is yet another string of awk/sed questions from a RegExp-Challenged luser :eek: I'm looking to have sed/awk do some clean-up on routing tables and to that end, I would like to do the following: 1.) If a line contains the word "masks" or "subnets" prepend CR/LF to... (16 Replies)
Discussion started by: SteveB-in-LV
16 Replies

10. Shell Programming and Scripting

PERL regular expression

Hello all, I need to match the red expressions in the following lines : MACRO_P+P-_scrambledServices_REM_PRC30.xml MACRO_P+P-_scrambledServices_REM_RS636.xml MACRO_P+P-_scrambledServices_REM_RS535.xml and so on... Can anyone give me a PERL regular expression to match those characters ? ... (5 Replies)
Discussion started by: lsaas
5 Replies

11. Programming

libxml2 documentation

i need to read/write a xml file in c i found libxml2, but the documentation is awfull, im using google but i get most of vb, or c# results can anyone point me to a introduction tutorial? actually, any kind of documentation would be ok (just not the oficial The XML C parser and toolkit... (2 Replies)
Discussion started by: broli
2 Replies

12. Shell Programming and Scripting

RegExp and egrep issue

I would like to to catch the ip at the following line with egrep and regexp: ip = and I built the following regexp to do it: (?<=ip\s=\s)\S+ when I check it with regexp simulator, it works but when I use it in the following egrep command it doesn't work - egrep -e... (2 Replies)
Discussion started by: datrigger
2 Replies

13. Shell Programming and Scripting

Strange RegExp Behaviour

Hello, I was trying to identify lines who has a word of the following pattern "xyyx" (where x, and ys are different characters). I was trying the following grep - egrep '(\S)()\2\1' This pattern do catches the wanted pattern, but it also catches "GGGG" or "CCCC" patterns. I was trying to... (5 Replies)
Discussion started by: itskov
5 Replies