in reply to Need 2 Regex's
More <to-the-point> answers may follow, if asked politely.1 . !~/\.(?:jpg|png|gif)$/ 2. perl -e '$f=shift(); -e $f and do{ my ($r,$d)=$f=~/(.+?)(\d*)$/; +$d++; $NEWFILENAME=qq|$r$d\n|}'
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|
|---|