Created
December 20, 2011 00:21
-
-
Save jccovey/1499575 to your computer and use it in GitHub Desktop.
Sublime Text 2 plugin to find and copy all timestamps to a scratch buffer
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
import sublime, sublime_plugin | |
class HarvestDates(sublime_plugin.TextCommand): | |
def run(self, edit): | |
date_matches = self.view.find_all("\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{2} (am|pm)") | |
date_buffer = self.view.window.new_file() | |
date_buffer.insert(0, 0, date_matches) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment