; REX
;
; Program for Proteus
;
; (C) 1998-2004 Simone Zanella Productions
;
; Various tests with regular expressions.
; No input is used; output is sent to console (alternated '1' and '0').
; Implicit parameters: input and output NULL
;!proteus -z
CONSOLELN REXMATCH("all stars", "^a")
CONSOLELN REXMATCH("begin", "^a")
CONSOLELN REXMATCH("camera", "a$")
CONSOLELN REXMATCH("video", "a$")
CONSOLELN REXMATCH("mida", "m..a")
CONSOLELN REXMATCH("manna", "m..a")
CONSOLELN REXMATCH("abacab", "^[abc]*$")
CONSOLELN REXMATCH("cdecd", "^[abc]*$")
CONSOLELN REXMATCH("cdecd", "^[^ab]*$")
CONSOLELN REXMATCH("abacab", "^[^ab]*$")
CONSOLELN REXMATCH("30/12/97", "^[0-3][0-9]/[0-1][0-9]/[0-9][0-9]$")
CONSOLELN REXMATCH("40/12/97", "^[0-3][0-9]/[0-1][0-9]/[0-9][0-9]$")
CONSOLELN REXMATCH("I will go then", "th(e|i)n")
CONSOLELN REXMATCH("in", "th(e|i)n")
CONSOLELN REXMATCH("it's thin", "th(e|i)n")
CONSOLELN REXMATCH("the", "th(e|i)n")
CONSOLELN REXMATCH("the unknown", "thee?")
CONSOLELN REXMATCH("th", "thee?")
CONSOLELN REXMATCH("I see thee", "thee?")
CONSOLELN REXMATCH("hee", "thee?")
CONSOLELN REXMATCH("123000", "^[0-9]*$")
CONSOLELN REXMATCH("1.25E23", "^[0-9]*$")
CONSOLELN REXMATCH("Field1", "^[a-zA-Z]+[a-zA-Z0-9]*$")
CONSOLELN REXMATCH("1FIELD", "^[a-zA-Z]+[a-zA-Z0-9]*$")
CONSOLELN REXMATCH("hello", "^(hello)|(goodbye)$")
CONSOLELN REXMATCH(" hello", "^(hello)|(goodbye)$")
CONSOLELN REXMATCH("goodbye", "^(hello)|(goodbye)$")
CONSOLELN REXMATCH("goodbye ", "^(hello)|(goodbye)$")
CONSOLELN IMATCH("the hose", "*h?se*")
CONSOLELN IMATCH("the house", "*h?se*")
CONSOLELN IMATCH("castle", "c*")
CONSOLELN IMATCH("the church", "c*")
CONSOLELN IMATCH("beauty", "*y")
CONSOLELN IMATCH("ready ", "*y")
CONSOLELN IMATCH("123", "???")
CONSOLELN IMATCH("1234", "???")
CONSOLELN IMATCH("I'll tell you one, two and three", "*one*two*three*")
CONSOLELN IMATCH("three two one", "*one*two*three*")