#
#  PRE: if
#
string test_string1
string test_string2

#
#  Strings which are expanded in a regex have regex special
#  characters escaped.  Because the input strings are unsafe.
#
test_string1 := "example.com"
test_string2 := "exampleXcom"

if ("exampleXcom" =~ /%{test_string1}/) {
	test_fail
}

if ("exampleXcom" !~ /%regex.safe(%{test_string1})/) {
	test_fail
}

if (test_string2 =~ /%{test_string1}/) {
	test_fail
}

success
