Regular Expressions 101

Library entries

SFTP with username and optional port & password

Vote

0

Regular Expression
pcre

/
(?<protocol>s?ftp):\/\/(?<user>[^@\s]+)@(?<host>[^\?\s:]+)(?::(?<port>[0-9]+))?(?:\?(?<password>.+))?
/
gm

Description

Loading markdown...
Submitted by anonymous - 8 years ago