DEV Community

Posted on • Updated on

What are you using RegEx for?

Hey there!
Yesterday I wrote a blog article about RegEx and that RegEx is the secret weapon of a programmer! There I show how to create a regular expression to validate the password strength.

RegEx Example

I use RegEx for validation user data (phone numbers, emails and co) and highlighting search results.

Now my question is, what do you use RegEx for? Let's start a discussion! :)

Top comments (3)

emanuelvintila profile image
Emanuel Vintila

I used regular expressions along with reflection to implement an MVC router, matching URLs against a table of routes, instantiating a controller and calling the appropriate method with the correct arguments.

krthr profile image
Wilson Tovar

I use RegEx to format a text taken from Wikipedia that will be read by TTS.

I delete the [1], [2], ... and parentheses.

webdeasy profile image

Good idea!