![]() ![]() ![]() The dates were a complete timestamp in 24-hour time. The Notepad++ regex that matched the ‘date:’ line I was looking for was this: date: (*) Then you’ll be in a good place to do the rest of these steps: Notepad++ Search and Replace with Regex Matchesįirst off, set the Search Mode to Regular Expression. ![]() Heck, grep even has a command-line options to control which implementation of regex it uses. The sad state of regular expressions is that expressions are not entirely portable between different implementations of regex searchers. It should be noted that this is strictly unique to Notepad++. I’ve cracked the code of how to do it in Notepad++. Regular expressions can find things easily, but I’m also told by witches that it can store the things it finds for later use, and that this is a powerful tool at their disposal. I needed to identify lines that matched “date: ” and then change it to “updated: ”. It came up when I wanted to do a mass-rename of a front-matter attribute in my blog posts. I recently have figured out how to perform one new nifty trick with Notepad++ and regular expressions: replacing text with a regular expression match. I don’t claim mastery - I just know enough to be alternately useless and useful. Anyone who claims mastery over regular expressions is a witch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |