mawk/test/reg4.awk
2016-09-05 17:22:38 -04:00

34 lines
837 B
Awk

# $MawkId: reg4.awk,v 1.9 2016/09/05 17:06:35 tom Exp $
# Test-script for MAWK
###############################################################################
# copyright 2009,2016 Thomas E. Dickey
#
# This is a source file for mawk, an implementation of
# the AWK programming language.
#
# Mawk is distributed without warranty under the terms of
# the GNU General Public License, version 2, 1991.
###############################################################################
{
if ($0 ~/^[-+()0-9.,$%\/'"]*$/)
{
print ("reg4.1<<:",$0,">>")
}
if ($0 ~/^[]+()0-9.,$%\/'"-]*$/)
{
print ("reg4.2<<:",$0,">>")
}
if ($0 ~/^[^]+()0-9.,$%\/'"-]*$/)
{
print ("reg4.3<<:",$0,">>")
}
if ($0 ~/^[[+(){}0-9.,$%\/'"-]*$/)
{
print ("reg4.4<<:",$0,">>")
}
if ($0 ~/^[^[+(){}0-9.,$%\/'"-]*$/)
{
print ("reg4.5<<:",$0,">>")
}
}