DEV Community

loading...

What are you using RegEx for?

webdeasy.de
Developer, what else?
Updated on ・1 min read

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! :)

Discussion (3)

Collapse
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.

Collapse
wilsontov 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.

Collapse
webdeasy profile image
webdeasy.de Author

Good idea!