In the case of the first regex, the [^\s] matches the last character of the name. But since it's not inside the round parenthesis, it is not included in $1.
In reply to Re: why is regex not matching final character?
by moritz
in thread why is regex not matching final character?
by fiverivers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |