spmjs / node-scp2

[MAINTAINER WANTED] A pure javascript scp program based on ssh2.
384 stars 96 forks source link

Regex fails to parse remote connection string when username contains underscore #62

Open scotthovestadt opened 8 years ago

scotthovestadt commented 8 years ago

This RegEx needs to be updated to include an underscore:

^([a-zA-Z0-9\-\.]+)(\:.*)?@([^:]+)(\:.*)?$

For example:

^([a-zA-Z0-9\-_\.]+)(\:.*)?@([^:]+)(\:.*)?$

This is then correctly parsed: username_underscore@host.com:path/