152
Comments
  • 6
    Write regex no internet*
  • 21
  • 14
    If you can't write a regex without Google, the only person you're hurting is yourself. A hard requirement of any editor I use is regex search capability and groups in my replace string. It's so incredibly powerful. Same with string checks and manipulation, individual string operations can be really slow and take a lot of code.
  • 1
    Much agreed @Neotelos
  • 5
    I do that all day. Only when i forget the negative lookbehind syntax phrasing again.
  • 0
    @darksideplease yeah, that one gets me too. Although lookbehind isn't supported in JS. 🙁
  • 5
    Easy, I have regexr.com memorized. I really only use it as a reference, using the "cheat sheet" panel on the side.

    I'd suggest avoiding regular-expressions.info, which unfortunately has a tendency to come up high on searches for anything to do with regex. That site IMO fails at both being a reference and also at being an effective tutorial. It's like expertsexchange, I automatically know not to even bother looking at those results.
  • 1
    @QoolQuy2000 ++1, that's a new one for me. The reference is amazingly simple and direct!
  • 0
    @QoolQuy2000 i used that site some times. it is dense but not very thorough. Look at the about page: the owner describes himself as expert on regular expressions.
  • 1
    For those that have access to the web, checkout regex101.com

    Brilliant application for testing and getting explanations for regexes
  • 3
    No offense, but regex isn't that hard as it looks..

    But if I need to search for a regress solution, I go to DuckDuckGo and type in the magic words "regex cheat sheet".
  • 1
    I had a problem that required regex. And now I've got two problems.
  • 1
    @Neotelos regex101.com is another good one.
  • 1
    I write them by heart.
  • 1
    Achievement unlocked.

    I love regex. It was confusing at first. A lot of swear words left my mouth while I was learning it... But now I can't imagine working without it. :)
  • 2
    @BuckFitches this would do nothing in most find utilies. You mean .*
  • 0
    Which dialect though? Remember there's different dialects of regex. What's valid in one engine might not work in another...
  • 2
    /^((?!google).)*$/

    Regex that matches a string that does not contain google.

    Regex without google.

    Had to use google to look up how to do negative lookaheads.
  • 0
    @tytho it probably doesn't work
  • 1
  • 0
    @tytho regex101 rules em all.
  • 0
    DDG "regex cheat sheet" 😁
  • 0
    I suck at them :D
  • 0
    I can do some simple find and replace stuff without documentation but I don't know all of it off the top of my head.
Add Comment