Well? What can it be used for?
I'm not a company, I don't have to sort through emails and shit, is it actually practical from a hobbyist standpoint?
>>61086391
bump
i use it crawl websites for phone numbers and emails for my buisness, and also for editing large amounts of html files, i don't know many other uses but regex is a nifty skill
>>61086391
Data validation, extracting a relevant part from user input, etc
>>61086391
Website crawling
Data validation
User input validation
Tokenization/parser generation
My most recent use was a parser that validates input like '5d2h' and returns 5 days and 2 hours in seconds for semi-scheduled actions
I used regex yesterday and it wasn't even in a script. Gedit's find and replace allowed me to use regex to clean up the formatting of some text files. Like by removing everything in brackets, for instance.
Still business related, but I use it constantly for turning the sewage that powershell outputs into csv files that excel can read.
inb4 any m$ shrill content. I know, I don't need to be reminded.
>>61086391
I like regex because it's incredible powerful and lets me save time almost every day, even when I'm not at work and just searching/replacing.
I had a couple of weeks of down-time at my last job because they were going through a merger, so I wrote a little tool to standardize the filenames of 15 years of scanned financial records. Felt good man.
>>61090435
I'll just add that there are some differences between the various implementations of regex. JS and .NET have slight but important differences. I use it a lot in notepad++
It also allows me to feel smug that there are people who can't read simple shit I write because I'm incredibly petty like that. I do write comprehensive comments though.
Bump because regex is regsex
>>61086391
well I just used it to grep through my history to see what I had used grep for earlier
>>61090358
Powershell has Export-Csv. If you're trying to parse CONSOLE output from cmdlets or functions you're doing it wrong.
>>61092562
When will cmdlets learn
>>61086391
*? isn't supported by every implementation
>>61086391
There is a page that makes It Very easy. Cant recall the name now. But when i get home i link It.
>>61086391
>Well? What can it be used for?
Parsing regular grammars.
>I'm not a company, I don't have to sort through emails and shit, is it actually practical from a hobbyist standpoint?
Imagine you just illegally ripped thousands degenerate hentai animuh and rare pepes, but your file names contain a hash code like c984v308vmssdf between the actual movie name and file extension.
You can write a regex to rename all files and remove the hash.