Test results for Win32 Console |
Test for the expulsion of input records that match the expel criteria. Expel the first three records if they contain fields with the string "root" in the 1st field or the string "0" in the 3rd or 4th field. Expel all input records that are 20 characters in length or less. Expel from the 3rd input record onwards if the 4th field contains the string "513", also test alternative string delimiters. Expel all input records that contain the string "*LK* in the 2nd field. Expel all input records that contain the string "/home/" in the 2nd to 4th or seventh fields.
Pass
cat _INPUT_DATA_ ¦ xmlfy -F : -E n1-3,f1/root/,f3-4/0/ -E c1-20 -E 'n3-$,f4%513%' -E 'f2/*LK*/' -E 'f6//home//:2-4,7'
root:x:0:0:Super-User:/:/sbin/sh bin:x:2:2::/usr/bin: guest:x:501:513:Guest user:/home/guest:/bin/rsh ag:x:600:602:Arthur Gouros:/home/ag:/bin/bash webdav:*LK*:701:703:Web Dav user:/etc/webdav:/bin/false
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xmlfy SYSTEM "xmlfy.dtd"> <xmlfy> <line> <field>ag</field> <field>Arthur Gouros</field> <field>/home/ag</field> </line> </xmlfy>