Created
December 28, 2010 10:13
-
-
Save wdkrnls/757110 to your computer and use it in GitHub Desktop.
Practice with regular expressions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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