DEV Community

Discussion on: What do you Google EVERY. SINGLE. TIME. and never just memorize?

Collapse
 
sarah_chima profile image
Sarah Chima

Regex. While I understand how it works and how it can be used, it's difficult for me to memorize the right regex that should be used at every point. So I just google whenever I want to make use of it. :)

Collapse
 
georgeoffley profile image
George Offley

I always have to Google regex. Or copied old code.

Collapse
 
redgreenrepeat profile image
Andrew

I had the same problem, until I found Rubular:

rubular.com/

Bonus tip: making a permalink will also save all the test cases used. Makes for an excellent inline comment!

Collapse
 
miffpengi profile image
Miff

It's funny in my case. I know enough regex to get by, but I generally need to google to find out how to actually apply it.

Do I need RegExp.prototype.test or String.prototype.match in JS? What are the order of parameters in preg_match in PHP? What are the little parentheses things called in .NET, captures or groups?

Collapse
 
kwabenberko profile image
Kwabena Bio Berko

Me too!
Hahaaahaa

Collapse
 
jeansberg profile image
Jens Genberg

I can never remember how it works either. I found this to be helpful, though! regexr.com/

Collapse
 
ben profile image
Ben Halpern

Oh yeah that's a big one

Collapse
 
rogerpaviani profile image
Roger Paviani

Same here...
BTW, I knew someone must've been written about regular expressions when I read the title.. πŸ˜‚

Collapse
 
reyabreu profile image
Reynaldo Jose Abreu • Edited

Same here. I can only remember $,,*,+ and /s /w. I always end up up googling an example and going from there.

Collapse
 
inozex profile image
Tiago Marques

I was just like that... but then I've found regex101.com/ and now, I'm almost proficiente writing regex!

Collapse
 
arakawadotca profile image
gustavo

regex101 is the single best resource I've ever found for regex.