Skip to content

Instantly share code, notes, and snippets.

View miguelteixeiraa's full-sized avatar

Miguel Teixeira miguelteixeiraa

  • Rio de Janeiro, Brazil
  • 04:41 (UTC -03:00)
View GitHub Profile
import re
def is_valid_id_start(num):
"""Returns True if the Unicode character represented by num is a
valid ID_Start according to the Unicode specification, False otherwise."""
pattern = re.compile(r'[$_\p{ID_Start}]', re.UNICODE)
return pattern.match(chr(num)) is not None

Keybase proof

I hereby claim:

  • I am miguelteixeiraa on github.
  • I am miguelteixeira (https://keybase.io/miguelteixeira) on keybase.
  • I have a public key ASDKaJqc1i34HhyZyf4Fafp4pDM6gxhL7JiiaTQuG0bqrAo

To claim this, I am signing this object: