Example REX.PRT
; 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*")
Samples index Next example Previous example Contents Index
Midnight Lake iPhone Case Black Women Shoes Black Flat Shoes Leather Flats Black Patent Ballerinas Black Ballet Shoes Casual Shoes Black Shoes Women Balle Record Player Cufflinks Best iPhone XR Clear Cases iPhone XS/XS Max Leather Cases Sale Best iPhone 8/8 Plus Silicone Cases iPhone 7/7 Plus Cases & Screen Protector New Cases For iPhone 6/6 Plus iPhone 8 Case Sale iPhone Xr Case Online iPhone 7 Case UK Online iPhone X Case UK Sale iPhone X Case Deals iPhone Xs Case New Case For iPhone Xr UK Online Case For iPhone 8 UK Outlet Fashion Silver Cufflinks For Men Best Mens Cufflinks Outlet Online The Gold Cufflinks Shop Online Cheap Shirt Cufflinks On Sale Nice Wedding Cufflinks UK Online Top Black Cufflinks UK Online Mens Cufflinks Online Silver Cufflinks For Men Men Cufflinks UK Sale Gold Cufflinks UK Online Gold Cufflinks UK Silver Cufflinks UK Shirt Cufflinks Discount Online Mens Cufflinks Deals & Sales Girls Shoes For Dance Fashion Ballet Dance Shoes Best Ballet Flats Shoes UK Online Cheap Ballet Pointe Shoes UK Online Best Ballet Shoes Outlet Best Dance Shoes Sale Cheap Ballet Flats Sale UK Best Pointe Shoes Online UK Ballet Dance Shoes UK Shoes For Dance UK Best Ballet Slippers Shop Best Yoga Shoes Hotsell