#
#  PRE: foreach foreach-break
#
string test_string

test_string := "ABCDEF_1"

#
#  This creates a bunch of User-Name attributes.
#
control.User-Name := { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g" }

foreach control.User-Name {
	if ("%{test_string}" =~ /([A-Z0-9\-]*)_%{Foreach-Variable-0}/) {
		test_string := "%{1}"
		success
		break
	}
	elsif ("%{Foreach-Variable-0}" == '1') {
		test_fail
		break
	}
}
