17

\S+?@\S+?\.\W(\.\W)?

Comments
  • 1
    What is this?
  • 2
    Not knowing regular expressions.. is like... worse than bring a Frontend dev.
  • 2
    @bagfox Can you please make your avatar
  • 2
  • 1
    @bagfox 😂
  • 1
    @bagfox I disagree. Sometimes regular expressions are too much abstraction if your use cases are small. There's been a couple of times where I took almost an hour trying to figure out a regex before I realized I just needed a very limited number of possibilities.

    But you should definitely learn regex.
  • 1
    @eo2875 If you need too long time to understand it, or the regex is too long, it’s a bad regex.

    Regex‘s do not exist to put many replacement actions into one. E.g. every email regex is a bad email regex.
  • 2
    Regex is just a tool. A handy one but not strictly necessity. Most C programmers don't use it. (Tailored logic is faster and more compact, that usually matters when you need the controle C provides)
  • 0
    @devrant Need an oiption where I spends all my ++ to vote all for ONE post, once a year maybe. Thios one is it for me.

    20 years in dev. NEVER used regEx.
  • 0
    even my cat can write regex, just put it on my keyboard
Add Comment