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
text/gemini
This content has been proxied by September (ba2dc).