Skip to content

Instantly share code, notes, and snippets.

@zhenyi2697
Created August 6, 2013 07:27
Show Gist options
  • Select an option

  • Save zhenyi2697/6162777 to your computer and use it in GitHub Desktop.

Select an option

Save zhenyi2697/6162777 to your computer and use it in GitHub Desktop.
Python: Use regular expression to test input/string
if not re.search(romanNumeralPattern, s):
raise InvalidRomanNumeralError, 'Invalid Roman numeral: %s' % s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment