exclude lines beginning with a # or the word echo
- Code: Select all
ftp.bat a b c d
sftp a b c d f
echo ftp
# ftp
# ftp
echo ftp
ftp_asc.bat 12 2 3 4
sftp rkrktkt .
ftp -iv
lines 1,7 and 9 should be selected
Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.
ftp.bat a b c d
sftp a b c d f
echo ftp
# ftp
# ftp
echo ftp
ftp_asc.bat 12 2 3 4
sftp rkrktkt .
ftp -iv


^\s*(ftp[^ ]*) ([^ ]+).([^ ]+).([^ ]+).([^ ]+.)


# ftp
sftp
echo ftp oiipo poipipiopoi ipoiipoipi
# ftp a v b
ftp_ascii.bat
$batch_dir/jobs/ftp.bat diriri
./ftp.batch kdkdkdd flflflf
/a/vb/x/jobs/ftp_aaa.bat kdkdkd ckckckc
ftp dkdkdkf fkfkfk
ftp_bin.ksh dndndndn nfmfmf
ftp_ascI-ro_bin.bat dfdkdkd d d d d d
$batch_dir/jobs/sftp.bat diriri
define ftp=d.x
ftp-out
^\s*?[^#e]*[^s]ftp\S*^(\s*?[^#e]*[^s])?ftp\S+[ \t]*(\S+)?[ \t]*(\S+)?[ \t]*(\S+)?[ \t]*(\S+)?





^(?>\s*)(?!#|echo|cat|define).*?(?<!s)ftp\S*(?:[ \t]+(\S+))?(?:[ \t]+(\S+))?(?:[ \t]+(\S+))?(?:[ \t]+(\S+))?^(?>\s*) # atomically consume any/all leading whitespace
(?!\#|echo|cat|define) # ensure first non-space char is not in blacklist
.*? # lazily grab everything up to 'ftp' (if any)
(?<!s)ftp\S* # match 'ftp*' but only if it is not preceded by 's'
(?:[ \t]+(\S+))? # capture first parameter into $1
(?:[ \t]+(\S+))? # capture second parameter into $2
(?:[ \t]+(\S+))? # capture third parameter into $3
(?:[ \t]+(\S+))? # capture fourth parameter into $4
