DEV Community

Cover image for Cheatsheet for the Regex Cheatsheet, Part III: POSIX

Cheatsheet for the Regex Cheatsheet, Part III: POSIX

Analogy | Absence | Example
The way I understand things is in relation to other things: Analogy: what can it be compared to? Absence: what would we have to do without it? Example: how does it work?
Updated on ・1 min read


I was recently doing a code challenge for a job interview that required me to strip out all nonalphabetic characters. "Ah! I should use Regular Expressions for this!" I thought in triumph, impressed that I even knew what regular expressions were. That fleeting moment of glory faded once I decided to brush up on regular expressions and landed on the encouragingly-named Regular Expressions Cheatsheet. I had no idea how to use it!

So, for people like me, here is a Cheatsheet for the Regular Expressions Cheatsheet, Part III: POSIX

Alt Text

What's a POSIX?

Okay, bear with me. POSIX means Portable Operating System Interface for uniX. It's just a different flavor of regex syntax that uses the following format: [:foo:] where foo is a descriptive term like upper for "Upper case letters" or xdigit for "Hexidecimal digits". The important thing, at least for this blog series, is that it is not supported in Javascript. For that reason, I'm not going to delve into it.

Onto Part IV!

Discussion (0)