Question: 
Write a function that matches a string that has an 'a' followed by anything, ending in 'b' by using regex.


Model's Code:
import re

def text_match(text):
    if re.search(r'a.*b$', text):
        return 'Found a match!'
    else:
        return 'Not matched!'



Sample Correct Code:
import re
def text_match(text):
  patterns = 'a.*?b$'
  if re.search(patterns,  text):
    return ('Found a match!')
  else:
    return ('Not matched!')


Asserts:
assert text_match("aabbbbd") == 'Not matched!'
assert text_match("aabAbbbc") == 'Not matched!'
assert text_match("accddbbjjjb") == 'Found a match!'


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

Test 879 of 974: 676/879 (76.90557451649602%): success