set /files/etc/hosts/#comment[.=~regexp('/e.*')] '/etc/hosts for testing specific functionality of augprint' set /files/etc/hosts/seq::*[ipaddr=~regexp('12.*')]/ipaddr '127.0.0.1' set /files/etc/hosts/seq::*[ipaddr=~regexp('12.*')]/canonical 'localhost' set /files/etc/hosts/seq::*[ipaddr=~regexp('12.*')]/alias[.=~regexp('localhost4')] 'localhost4' set /files/etc/hosts/seq::*[ipaddr=~regexp('12.*')]/alias[.=~regexp('localhost\\..*')] 'localhost.localdomain' set /files/etc/hosts/seq::*[ipaddr=~regexp('12.*')]/#comment 'ipv4' set /files/etc/hosts/seq::*[ipaddr=~regexp('::1')]/ipaddr '::1' set /files/etc/hosts/seq::*[ipaddr=~regexp('::1')]/canonical 'localhost' set /files/etc/hosts/seq::*[ipaddr=~regexp('::1')]/alias 'localhost6' set /files/etc/hosts/seq::*[ipaddr=~regexp('::1')]/#comment 'ipv6' set /files/etc/hosts/#comment[.=~regexp('"d.*')] '"double-quoted"' set /files/etc/hosts/#comment[.=~regexp("'s.*")] "'single quoted'" set /files/etc/hosts/#comment[.=~regexp('Comment\tt.*')] 'Comment\ttab\t\ttabx2' set /files/etc/hosts/#comment[.=~regexp('Comment .*')] 'Comment \\backslash \\\\double-backslash' set /files/etc/hosts/#comment[.=~regexp('Re.*')][1] 'Repeated comment' set /files/etc/hosts/#comment[.=~regexp('Fi.*')] 'First preference, unique first tail (/ipaddr)' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.1')]/ipaddr '192.0.2.1' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.1')]/canonical 'example.com' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.1')]/alias[.=~regexp('ww.*')] 'www.example.com' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.1')]/alias[.=~regexp('ft.*')] 'ftp.example.com' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.2')]/ipaddr '192.0.2.2' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.2')]/canonical 'example.com' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.2')]/alias[.=~regexp('ww.*')] 'www.example.com' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.2')]/alias[.=~regexp('ft.*')] 'ftp.example.com' set /files/etc/hosts/#comment[.=~regexp('Se.*')] 'Second preference, unique tail+value for /alias[1]' set /files/etc/hosts/seq::*[alias=~regexp('find_this1')]/ipaddr '192.0.2.77' set /files/etc/hosts/seq::*[alias=~regexp('find_this1') or count(alias)=0]/canonical 'second' set /files/etc/hosts/seq::*[alias=~regexp('find_this1') or count(alias)=0]/alias[.=~regexp('fi.*')] 'find_this1' set /files/etc/hosts/seq::*[alias=~regexp('find_this1')]/alias[.=~regexp('al.*')] 'alias77' set /files/etc/hosts/seq::*[alias=~regexp('find_this1')]/#comment 'add another tail (this comment)' set /files/etc/hosts/seq::*[alias=~regexp('find_this2')]/ipaddr '192.0.2.77' set /files/etc/hosts/seq::*[alias=~regexp('find_this2') or count(alias)=0]/canonical 'second' set /files/etc/hosts/seq::*[alias=~regexp('find_this2') or count(alias)=0]/alias 'find_this2' set /files/etc/hosts/#comment[.=~regexp('Third preference,.*')] 'Third preference, unique (first-tail /ipaddr + tail+value /alias[1] )' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and alias=~regexp('alias1')]/ipaddr '192.0.2.33' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and ( alias=~regexp('alias1') or count(alias)=0 ) ]/canonical 'third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and ( alias=~regexp('alias1') or count(alias)=0 ) ]/alias 'alias1' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and alias=~regexp('alias2')]/ipaddr '192.0.2.33' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and ( alias=~regexp('alias2') or count(alias)=0 ) ]/canonical 'third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.33') and ( alias=~regexp('alias2') or count(alias)=0 ) ]/alias 'alias2' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and alias=~regexp('alias1')]/ipaddr '192.0.2.34' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and ( alias=~regexp('alias1') or count(alias)=0 ) ]/canonical 'third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and ( alias=~regexp('alias1') or count(alias)=0 ) ]/alias 'alias1' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and alias=~regexp('alias2')]/ipaddr '192.0.2.34' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and ( alias=~regexp('alias2') or count(alias)=0 ) ]/canonical 'third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.34') and ( alias=~regexp('alias2') or count(alias)=0 ) ]/alias 'alias2' set /files/etc/hosts/#comment[.=~regexp('Third preference .*')] 'Third preference for first one, Fourth preference (fallback) for second and third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99') and canonical=~regexp('th.*')]/ipaddr '192.0.2.99' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99') and ( canonical=~regexp('th.*') or count(canonical)=0 ) ]/canonical 'third' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99') and canonical=~regexp('th.*')]/alias 'abc' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][2]/ipaddr '192.0.2.99' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][2]/canonical 'fourth' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][2]/alias[.=~regexp('abc')] 'abc' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][2]/alias[.=~regexp('def')] 'def' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][3]/ipaddr '192.0.2.99' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][3]/canonical 'fourth' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][3]/alias[.=~regexp('abc')] 'abc' set /files/etc/hosts/seq::*[ipaddr=~regexp('192\\.0\\.2\\.99')][3]/alias[.=~regexp('def')] 'def' set /files/etc/hosts/#comment[.=~regexp('Re.*')][2] 'Repeated comment'