💾 Archived View for rawtext.club › ~sloum › geminilist › 007565.gmi captured on 2023-09-28 at 16:18:55. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
codesoap at mailbox.org codesoap at mailbox.org
Mon Nov 8 19:07:03 GMT 2021
- - - - - - - - - - - - - - - - - - -
Hi all,the specification says this about link lines:
=
[<whitespace>]<URL>[<whitespace><USER-FRIENDLY LINK NAME>]
where:
• <whitespace> is any non-zero number of consecutive spaces or tabs
• Square brackets indicate that the enclosed content is optional.
• <URL> is a URL, which may be absolute or relative.
From this description I don't know whether <USER-FRIENDLY LINK NAME> MAYbe empty. Which of these regular expressions would be correct to parse alink line?
a) ^=
[ \t]*([^ \t]+)(?:$|[ \t]+([^ \t].*)$)b) ^=
[ \t]*([^ \t]+)(?:$|[ \t]+([^ \t]?.*?)$)
Or are both wrong, because I misunderstood "spaces" as 0x20?
Sorry for the nitpicking :p
GreetingsRichard Ulmer