Ancestors

Toot

Written by Gary "grim" Kramlich on 2025-01-05 at 04:30

They say when you use regex you have two problems. I tend to have one less problem...

Case in point, here's a tokenizer for https://www.rfc-editor.org/rfc/rfc5801.html#section-4.

^(?:(?PF),)?(?P[npy])(?:=(?P[^,]+))?,(?:a=(?P[^,]+))?,

Validation still has to be done in the application, but this is still way easier than writing and maintaining a lexer.

[#]regex #coding #development #rfc

=> More informations about this toot | More toots from grimmy@mastodon.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113773867448234933
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
240.181344 milliseconds
Gemini-to-HTML Time
0.291487 milliseconds

This content has been proxied by September (ba2dc).