---
title: "Discussion on \"Regex…\" | Hashnode"
description: "Discussion on \"Regex…\". Regular expressions are one of the most powerful, but complicated things you can use in web development. They are pretty cryptic by nature and it can take a while to figure out what they are really doing. That's why it's important you understand how ..."
url: "https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Regex…](https://hashnode.com/post/regex?utm_source=hashnode&utm_medium=feed)

Regular expressions are one of the most powerful, but complicated things you can use in web development. They are pretty cryptic by nature and it can take a while to figure out what they are really doing. That's why it's important you understand how ...

Dec 18, 2018 · hashnode.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#regex](https://hashnode.com/tag/regex)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Milecia](https://hashnode.com/@flippedcoding)

@flippedcoding

  
[View profile](https://hashnode.com/@flippedcoding)

Mentors new developers | Teaches people un-fluffy code | Tech conference speaker | Super Software Engineering Nerd

Milecia is a senior software engineer, but she also has a master&#39;s degree in mechanical and aerospace engineering and has published research in machine learning and robotics. She started Flipped Coding in 2017 to help people learn web development with real-world projects and it&#39;s being growing ever since. In her free time, she spends time with her husband and dogs while learning to play the ukulele and learning Japanese.

## Responses 2

Markdown supported · ⌘↵ to post

[Jason Knight](https://hashnode.com/@cutcodedown)

[Dec 18, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c194dde3960ebb0612df5b4)

> This regular expression meets all of those security requirements set by the internet people.

Except for lengths. :D

[Sébastien Portebois](https://hashnode.com/@sportebois)

[Dec 20, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c194dde3960ebb0612df5b4#reply-5c1b8348ce0fd2f92cb365f6)

Definitely. I didn't take the time to battle test it, but when I read `(\.[^<>()\[\]\\.,;:\s@"]+)*)` in the sample above, I started to smell redos opportunities here

[Mark](https://hashnode.com/@mverleg)

[Dec 18, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c1923fe82e2450f7afc6eb9)

The page [regex101.com](https://regex101.com/) is really useful for analyzing regular expressions.

Note that `/^[a-zA-Z]+$/` misses a lot of letters, like "é" or "字"

[Mark](https://hashnode.com/@mverleg)

[Dec 18, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c1923fe82e2450f7afc6eb9#reply-5c1953f63960ebb0612df5c6)

I like the name "internet people" by the way

[Sébastien Portebois](https://hashnode.com/@sportebois)

[Dec 20, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c1923fe82e2450f7afc6eb9#reply-5c1b82ffce0fd2f92cb365f3)

On that note, I recently discovered that some regex engines treat some meta characters differently depending on the locale. With Python (and it changed between 2 and 3!) `\w` is either equivalent to `[a-zA-Z0-9_]`, or the same one plus all the diacritics of the language (e.g. éèàùç...) (in Python, that's where the `re.ASCII` flags is useful

I'm curious to see how people use regexes e.g. which one do you use between \\d vs \[0-9\], things like that?

[Mark](https://hashnode.com/@mverleg)

[Dec 20, 2018](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c1923fe82e2450f7afc6eb9#reply-5c1b8a2013e6579f6dfd227b)

Well 90% of my regex use is searching through codebase or logfiles or the like. Not as part of the application, so I just use whatever works. For real text, I think you'd need `\p{L}` ([src](https://stackoverflow.com/questions/3617797/regex-to-match-only-letters)) but unicode is tricky...
