import re

strings = [
	'a1b2c$3d#4e!f@ghi0',
	'test$test$test123'
]

for str in strings:
	sym = r'^[^!@#$%&*\r\n]*[!@#$%&*][^!@#$%&*\r\n]*[!@#$%&*][^!@#$%&*\r\n]*\Z'
	num = r'^[^\d\r\n]*\d[^\d\r\n]*\d'
	
	if re.search(sym, str) and re.search(num, str):
	    print(f'match! {str}')
	else:
	    print(f'no match! {str}')