Quick Recap # In Part 5 , we covered metacharacters, escaping with backslash, and the dot wildcard. We learned the 14 special characters and how to match them literally. Now let’s combine patterns with “or” logic and control what our quantifiers apply to. The Pipe Means OR # The pipe character | means “or” in regex. cat|dog matches either “cat” or “dog.” Grouping with Parentheses # Here’s where it…
Quick Recap # In Part 4 , we covered quantifiers: * (zero or more), + (one or more), ? (optional), and {n,m} (specific counts). We also learned that quantifiers apply to the element directly before them. Now let’s talk about the characters regex treats as special and how to handle them. The 14 Metacharacters # Regex has 14 characters that have special meaning. These are called metacharacters : . *…
Quick Recap # In Part 3 , we covered character classes: square brackets that match one character from a set, POSIX classes like [[:digit:]] , and negation with [^...] . Now let’s talk about how many characters to match. The Four Core Quantifiers # A quantifier tells the regex engine “how many of the previous thing do I want?” There are four you’ll use constantly: Quantifier Meaning Example * Zero…
Learn Regex the Easy Way, Part 3: Character Classes # Quick Recap # In Part 2 , we learned about anchors and boundaries. The caret ^ matches the start of a line, $ matches the end, and \b matches word edges. They match positions, not characters. Now let’s match actual characters, but with more control than just typing them out literally. Square Brackets Create a Character Class # A character class…
Learn Regex the Easy Way, Part 2: Anchors and Boundaries # Quick Recap # In Part 1 , we talked about what regular expressions are, why they look intimidating (they really do look like a cat sat on your keyboard), and why verbose mode with comments is the way to learn them. We also set up regex101.com in PCRE2 mode. Now let’s write some actual regex. Anchors Match Positions, Not Characters # Here’s…
Introduction and The Problem Regular Expressions have been around for a long time and can solve problems nothing else really seems to be able to. There are a lot of great examples of where to use them, and where to not use them. Every once in a while, a new product (or version of a product) comes out which includes regex support. Some people get excited about being able to use regular expressions.…
Growl is being retired after surviving for 17 years. With the announcement of Apple’s new hardware platform, a general shift of developers to Apple’s notification system, and a lack of obvious ways to improve Growl beyond what it is and has been, we’re announcing the retirement of Growl as of today. It’s been a long time coming. Growl is the project I worked on for the longest period of my open…
Ad networks are serving up malware. This is a practice known as malvertising. This scenario is becoming more and more common as an infection vector utilizing different exploit kits. Imagine this. You browse a website. Then you get an infection. The website is one which is well known, in the top 500 websites on the internet, and has been around for years. This website provides you with daily news…
TLS superseded SSL a very long time ago. However SSL never really went away since it was still considered to be safe. That changed last year and this year. It is no longer safe to use and needs to be removed, else face the consequences. Going one step further, TLS 1.0 is also a bad idea. Utilizing TLS 1.2 is really the best option. If you are writing an application and utilizing encryption from…
One thing that i do not see a lot of people talking about this week is the new Family Sharing that was introduced at WWDC. At first it seems like a neat way to just share some pictures and photos, locations and some content. However it is critical that you, the developer, pay attention to this. YOU MUST ENABLE FAMILY SHARING I cannot stress this enough. It’s an optional thing that you have to…