Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
himalay1269y@g-m-f As a developer how can you not use regex for couple weeks? You should be using regex every day, at least for find and replace stuff. Try your regex here http://regexr.com/ -
himalay1269y@g-m-f I meant, use of regex while doing find and replace in IDE/Text-editor, or while using find/grep/sed/awk in cli. -
himalay1269y@g-m-f Let me show you an example. Let's say you have this paragraph texts with a bunch of URLs and you want to add anchor tags to all of them.
eg.
This is a http link to http://google.com and this is https link to https://google.com.np. Here is another http link to http://www.devrant.io and https link to https://www.devrant.io.
You can use the following regex to add anchor tags to all the different URLs at once.
Find:(https?:\/\/([\w\.]+\w+))
Replace:<a href="$1">$2</a> -
PRein11709yAll I knew about regex even before actually using it was.. if you have a problem that you want to solve with regex you will only end up with two problems.
turned out to be pretty true.
Related Rants

The only expressions devs have
He's got a valid point
How to break a chatbot (well done).
Learning regex is like finding a scalpel when thus far you've been trying to dissect a frog with a chainsaw.
undefined
regex