May user-friendly link names be empty?

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> MAY
be empty. Which of these regular expressions would be correct to parse a
link 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

Greetings
Richard Ulmer


Archive home | About this archive