Toot

Written by jz.tusk on 2025-01-21 at 03:46

@jik

If the ([^ \t]) matches a \n, then the regex engine will have already moved past it, so even though you've got the /g option that particular \n won't match the first character of your regex? But when you pass it back in on the next loop it will?

Basically, "because \n\n is possible".

This feels like a situation where one of those extended regex attributes that means something like "match but don't consume" might do the trick for a single pass solution, but I never learned those. 😁

=> More informations about this toot | View the thread | More toots from jztusk@mastodon.social

Mentions

=> View jik@federate.social profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113864290056738253
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
194.284261 milliseconds
Gemini-to-HTML Time
0.464745 milliseconds

This content has been proxied by September (ba2dc).