I wrote these to find gets. I have one for the traditional ones like dubs, trips, quads, quints, etc. I also have one expanded for sequences like 123123. The expanded one can't do something like 112233 though. I think 123456 is also a pretty special get. Could we have an expression to get all of these without using OR?
AFAIK I've seen that one before and it doesn't handle nested comments (legal RFC 822 syntax). Email address parsing is a great example of why regexes are shit for parsing.
It's a highly expressive and specialized language. That's the tradeoff it makes.
The alternative would be having some monster like startLine(), repeat(any('a','b','c'),0,infinity), endLine() for doing what could be done with ^[abc]*$
[/code], not [\code]. RegEx is really useful, claims by a linux a/s/g user here. Though it looks confusing when it's bloated enough since there's no extra characters allowed in regex, but it can deal nearly any types of text processing.
gets (\d)\1+$ gets++ (\d+)\1+$
I can't believe I made such a shitty OP. I forgot reduce my image size too.
Since you guys like regex so much, I might come back later with some finite automata, and we can practice translating them to grammars and regex. I can't right now though.
Oh, I'm not saying I don't like it. It's just blowing my mind. I didn't know something like this even existed until this thread.
Actually, that looks pretty nice. It would be cool to have a program that can generate a regex from a more human-readable language. I think LISP S-expressions would work pretty well for this. Well, now I have an idea for what to do when I'm further into SICP.
I tried making a regex generator for normies, but it's more difficult that I expected.
What are grok patterns?
Fun challenge: Make an XML parser in Regex.
10 / 10 would do again
Best regex meme.
Also ITT: kripplecice fix ur shit
Nice snipe hunt. The reason why regular expressions can't parse XML is in the name. I've worked on a pushdown automata for parsing JSON and XML before.