Created
April 18, 2017 22:08
-
-
Save brodieG/b648c113fd08d7d40b494bf25e73fb63 to your computer and use it in GitHub Desktop.
Grep Stack Overflow
This file contains hidden or 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
reg <- "(A|B)*" # overflow | |
reg <- "([AB])*" # works | |
string <- paste0(rep("A", 1e4), collapse="") | |
grep(reg, string, perl=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment