DEV Community

Discussion on: How do you regex?

Collapse
 
mellen profile image
Matt Ellen

I mostly use regex for searching files for something. A string I sort of remember, but not quite, or if I want to double check the "find all instances of" type thing in an IDE.

For whatever reason I find grep easier to use than "find in files" of most IDEs.

I don't usually have to look up how anything works, because I've learnt that now, with the exception of look ahead and look behind, and sometimes I forget which is the end anchor and which is the start anchor.

The problem I hit most often is forgetting what I have to escape. For example, what I have to escape in emacs is different to what I have to escape in bash.