Created
September 4, 2015 09:39
-
-
Save rpechayr/8b4bef1516a6fb056228 to your computer and use it in GitHub Desktop.
Huge regex match time
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
bod = "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n--- \n**Pivotal Tracker** - [#100934594](https://www.pivotaltracker.com/story/show/100765594)\n*Estimation*: **2.0 points**\n*ETA*: **14th August 2015**\n\n--- \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | |
reg = /^--- (.|\n)*--- /m | |
hello = "hi" | |
bod.gsub(reg, hello) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment