\s is matching more than a space, matching more than a space here is wrong, it matches for example
It's not that the \s is matching more than a space, it's that the pattern is not ensuring a space is between the alias [-l] and the name. Changing the pattern (on the second part of it) to something like below would work.:
(?:alias\s+(?:-l\s+)?)?\s\/?([^\{ \[#;]+).*$/