File Manager

Current Path : /usr/share/doc/crm114/examples/tests/
Upload File :
Current File : //usr/share/doc/crm114/examples/tests/approxtest.crm

#! /usr/bin/crm
#
#	approxtest.crm - test approximate regex matching,
#		usually reading from approxtest-args.txt

# Copyright 2009 William S. Yerazunis.
# This file is under GPLv3, as described in COPYING.

window
output / Start of approximate match testing. :*:_nl:/
isolate (:words:) /molasses anaconda foo bar baz agentsmith mranderson /
output /:*:_nl:Input string to match against: ":*:words:":*:_nl::*:_nl:/
isolate (:patterns:)
input (:patterns:)
isolate (:p:) /bleah/
{
	window <eofaccepts> (:p:) (:patterns:) /.*/ /:*:_nl:/
	match  (:z: :pa:) [:p:] /(.+)./
	output /:*:pa:/
	{
	    {
		{
			match (:out:) [:words:] /:*:pa:/
			output / ---> :*:out:/
		}
		alius
		{
			output / <no match> /
		}
     	    }
	    trap (:zeta:) /.*/
	    {
	    	output / <invalid> /
	    }
	}
	output /:*:_nl:/
	liaf
}
output / end of approximate match testing. :*:_nl:/

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com