Last active
August 29, 2015 14:15
-
-
Save cuevasclemente/5fc2fd2a6a335a9ed9d4 to your computer and use it in GitHub Desktop.
Some of my favorite regexps, with explanations when I can remember them. Not all actually in proper Julia form necessarily
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
replace(searchstring,r"\w(?=\?)|(\w)$",'?')) | |
search(r"(?<=\().*?(?=\))", title) | |
search("(?=, ).*(?<=(is:))",locationstring) | |
match(Regex("(\\w*.?\\s){$numofwords}"),title) | |
# Matches a single % sign only when it has no trailing or suceeding % signs | |
match(r"(?<!\%)\%(?!\%)", string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment