Skip to content

Instantly share code, notes, and snippets.

@wdkrnls
Created December 28, 2010 10:13
Show Gist options
  • Save wdkrnls/757110 to your computer and use it in GitHub Desktop.
Save wdkrnls/757110 to your computer and use it in GitHub Desktop.
Practice with regular expressions
pattern = """
\b # new word boundary
NCC # Match NCC
( ?-? ?) # Match '-'
([0-9][0-9]+) # Match registry number
( ?-? ?) # Match optional '-'
([A-Z]?) # Match optional suffix
\b # end word boundary
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment