Originally Posted By: Wims
\s is matching more than a space, matching more than a space here is wrong, it matches for example
Code:
alias
alias_name {


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.:

Code:
(?:alias\s+(?:-l\s+)?)?\s\/?([^\{ \[#;]+).*$/



Last edited by Firstmate; 26/12/11 07:08 PM.