Given a string, determine if it's a valid identifier.

## Here is the syntax for valid identifiers:
* Each identifier must have at least one character.
* The first character must be picked from: alpha, underscore, or dollar sign. The first character cannot be a digit.
* The rest of the characters (besides the first) can be from: alpha, digit, underscore, or dollar sign. In other words, it can be any valid identifier character.

### Examples of valid identifiers:
* i
* wo_rd
* b2h

### Examples of invalid identifiers:
* 1i
* wo rd 
* !b2h

Difficulty: EASY
Starter code: def is_valid(idn):
	

Solutions:
import re

def is_valid(idn):
	return re.compile('^[a-z_\\$][a-z0-9_\\$]*$', re.IGNORECASE).match(idn) != None


import re
is_valid = lambda id: bool(re.match('^[a-z_$][\\w$]*$', id, re.I))


import re

def is_valid(identifier):
	return bool(re.fullmatch('[a-z_$][\\w$]*', identifier, flags=re.IGNORECASE))


import re

def is_valid(idn):
	pattern = '^[a-zA-z_\\$]+[\\w\\$]*$'
	return bool(re.match(pattern, idn))


import re

def is_valid(idn):
	return bool(re.match('[a-z_$][a-z0-9_$]*$', idn, flags=re.IGNORECASE))


import re

def is_valid(idn):
	line = re.match('[a-zA-Z_$]\\w*$', idn)
	if line:
		return True
	else:
		return False


import re

def is_valid(idn):
	return re.match('^[a-zA-Z_$][\\w_$]*$', idn) is not None


is_valid = lambda idn: len(idn) > 0 and idn[0].lower() in '$_abcdefghijklmnopqrstuvwxyz' and all([l.lower() in '$_abcdefghijklmnopqrstuvwxyz0123456789' for l in idn[1:]])


is_valid = lambda idn: bool(__import__('re').match('^[a-zA-Z_$][\\w$]*$', idn))


is_valid = lambda idn: __import__('re').match('^[a-zA-Z_\\$][a-zA-Z0-9_\\$]*$', idn) is not None