Question: 
Write a function to check that the given string contains only a certain set of characters(in this case a-z, a-z and 0-9) by using regex.


Model's Code:
import re

def is_allowed_specific_char(s):
    return bool(re.fullmatch(r'^[a-zA-Z0-9]*$', s))



Sample Correct Code:
import re
def is_allowed_specific_char(string):
    get_char = re.compile(r'[^a-zA-Z0-9.]')
    string = get_char.search(string)
    return not bool(string)


Asserts:
assert is_allowed_specific_char("ABCDEFabcdef123450") == True
assert is_allowed_specific_char("*&%@#!}{") == False
assert is_allowed_specific_char("HELLOhowareyou98765") == True


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 210 of 974: 155/210 (73.80952380952381%): success