Date's can be a pain! Often we work with text that will have dates structured in different ways. In this video Isaias shows how he's solved this using a Look Ahead in a Regular Expression.
You can get the script mentioned in the video here: https://www.the-automator.com/DateParser
TLDR: The key idea of the video is to demonstrate how to use regular expressions with look aheads to extract specific content from strings, such as matching and manipulating dates.
1. 00:00 🔍 Match strings with the words "one," "two," and "three" in any order using look aheads in regular expressions.
1.1 The video demonstrates a simple example of using look ahead in regex to easily find multiple things in any order.
1.2 Match strings that contain the words "one," "two," and "three" in any order using look aheads in regular expressions.
2. 01:56 🔍 The speaker demonstrates how to use regular expressions with the "m" flag for multiline matching and look ahead to extract specific content from a string, such as matching the word "one" and its preceding content.
2.1 The speaker explains how to use regular expressions to match and extract specific content from a string, emphasizing the use of the "m" flag for multiline matching.
2.2 The speaker explains how to use look ahead in regex to match the word "one" and anything preceding it in a string.
3. 03:56 🔍 The speaker shows how to use look ahead in regex to match a string with specific words, without consuming them, and how to grab and store those elements if needed.
3.1 The speaker demonstrates how to use look ahead in regex to match a string that contains three specific words in any order.
3.2 Look ahead in regex allows you to check if certain elements are present without consuming them, but if you want to grab and store those elements, you can use the word or grouping you're looking for.
4. 06:30 📝 Use regex to extract specific components from a string, like matching numbers for the day and month and converting the month into its numeric representation.
4.1 Create a new group, name it, match a word, store it in a variable, and access the variable later.
4.2 The speaker explains how to use regex to extract specific components from a string, such as matching numbers for the day and month and converting the month into its numeric representation.
5. 09:04 📅 Use look aheads in regex to extract specific components from a date string, simplifying the process of determining the day and allowing for customization of the output format.
5.1 The speaker explains how to use look aheads in regex to extract specific components from a date string, allowing for easier manipulation and referencing in code.
5.2 Use the date dot parse function to extract and format a date in a specific way, simplifying the process of determining the day and allowing for customization of the output format.
6. 11:21 📅 The speaker shows how to change the date format in a string using regex, specifically moving the month to the beginning and adding dashes.
6.1 The speaker demonstrates how to change the date format in a string using regex, specifically showing how to move the month to the beginning and add dashes.
6.2 The speaker discusses reformatting dates in a specific format using regex look aheads, with the ability to later change the formatting to any desired format.
7. 13:18 💡 The speaker discusses the option of donating three dollars for future scripts and encourages viewers to join the hero group for more efficient learning.
8. 14:00 🔍 The speaker discusses finding ways to save time by using regex to grab a date from a string.