Created
August 2, 2011 18:32
-
-
Save wraithan/1120848 to your computer and use it in GitHub Desktop.
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
find \w\w-\d+ unless it is at the end of a url: | |
example.com/browse/AM-3245 -- No Match | |
blah blah blah AM-3245 bah -- AM-3245 | |
AM-3245 blah blah -- AM-3245 | |
AM-3245 -- AM-3245 | |
/\b(\w\w-\d+)/ is what I have currently which matches in all of the above cases, instead of not matching on the url. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment