Question: 
Write a function to remove everything except alphanumeric characters from the given string by using regex.


Model's Code:
import re

def remove_extra_char(s):
    return re.sub(r'[^a-zA-Z0-9]', '', s)



Sample Correct Code:
import re
def remove_extra_char(text1):
  pattern = re.compile('[\W_]+')
  return (pattern.sub('', text1))


Asserts:
assert remove_extra_char('**//Google Android// - 12. ') == 'GoogleAndroid12'
assert remove_extra_char('****//Google Flutter//*** - 36. ') == 'GoogleFlutter36'
assert remove_extra_char('**//Google Firebase// - 478. ') == 'GoogleFirebase478'


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

Test 676 of 974: 507/676 (75.0%): success