Real world examples of regex

Dear All,

Today I’ve completed regular expression section but still need to do loads of practice to gain confidence.

Can you please share any website which shares real world regex ? I did google but didn’t find any comprehensive list from real world projects.

Thanks in advance.

Hey @vikramvi,

I don’t really know any sites that gives regex challenges (well, because people really hate regex for it’s syntax) anyways, if you want to study more about regex, there are a lot of sites where you can try regex out yourself with your own testcases, here are some:

https://regexr.com

https://www.commitstrip.com/en/2014/02/24/coder-on-the-verge-of-extinction/?setLocale=1

If by real world you mean a regex tester I always use https://regex101.com/ If by real world you mean an example of use I can give you one from my world:
I have a Powershell script that gets a list of servers from Microsoft AD with Get-ADComputer, sorts them with a regex by name and restarts 3 services on some of them
/Jakob

Oh, and there’s always an xkcd :slight_smile:

Real-world usage is exactly the same as the usage in the examples/challenges on FCC, there isn’t really a distinction: it’s just a way to match some pattern in a string, it’s not as if you use it any differently IRL