Skip to content

Instantly share code, notes, and snippets.

@wdkrnls
Created December 28, 2010 10:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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