;Pattern Matching
;Sample Input: file with a directory listing
; 27-06-01 09:21a
WINDOWS
;Sample Output:
; The subdirectory 'Data' was created at 03:42
; The subdirectory 'labs' was created at 23:11
;To run from command line:
; omnimark -sb scandir.xom -of scandir.out -log scandir.err -warnings
global stream streamTime
global stream streamSubdir
process
submit file "listing.dat"
process
find line-start
(digit{2} "-" digit{2} "-" digit{2})
white-space+
(digit{2} ":" digit{2} any-text) => tempTime
white-space+
""
white-space+
any-text+ => tempSubdir
set streamTime to tempTime
set streamSubdir to tempSubdir
output "The subdirectory '%g(streamSubdir)' was created at %g(streamTime)%n"
find any