Why is nobody telling me the obvious way to actually parse this stuff :(

@aescling Why not? There needs to be. This format is everywhere. Do people not need to analyze their logs?

@vaporeon_ much of the time you don’t have to deal with robustly matching on an irregular language

@aescling Which part of it is irregular? I think I've figured out how to match it with a regex after all, I was just too stupid to figure it out sooner, see here: glaceon.social/@vaporeon_/1170
Unless I'm overlooking some problem with that?

And do you not commonly see log files or similar things that use a format with quoted and escaped strings because they want fields that can contain a whitespace or a "?

Follow

@vaporeon_ what if the inner quotation marks in a field aren’t backslash escaped? (or does Apache ensure that they are? in which case, never mind)

@aescling The Apache documentation doesn't say it (at least not where I could find), but if I do curl 'http://daxpy.net/"', then it appears in the logs as

2026-08-04_01:15:24 "GET /\" HTTP/1.1" 404 236 - "-" "curl/8.19.0"

So clearly it escapes them. Otherwise this'd be completely impossible to parse, because you can't distinguish where the field starts/ends from user-supplied quotation marks

@aescling And Mastodon decided to actually attempt fetching this link... And it got it wrong, too, it decided that the ' and the ` that ends the code Markdown are part of the URL when they're not

2026-08-04_01:16:33 "GET /%22'%60 HTTP/1.1" 404 236 - "-" "Mastodon/4.4.0-alpha.4+glitch (http.rb/5.2.0; +https://glaceon.social/) Bot"
Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.