in reply to RegEx Help
@Files =( "filename=merilyn14.jpg.jpeg", "filename=...) $file = "filename=merilyn14.jpg.jpeg"
mmmh... That seems a strange way to me to call a file, a source of potential troubles with your script in the future, "filename=merilyn14.jpg.jpeg" is not a file, nor even a filename, I will fix this if I were you.
$file = "merilyn14.jpg.jpeg"more questions
print "FoxyM New fold = $nFold file = $nFile\n";Maybe you will prefer this, probably less ambiguous and more readable, form...
print "FoxyM New fold = ", $nFold, " file = ",$nFile, "\n";And
foreach my $file (@Files) { if ($file =~ m/filename=(\d.*?)([a-zA-Z].*?)\.j/i)
... same as:
foreach my $file (@Files) { if (/^filename=(\d.*?)([a-zA-Z].*?)\.j/)
Don't need to use /i in the match if you are using also a-zA-Z
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegEx Help
by ww (Archbishop) on Dec 17, 2011 at 22:11 UTC | |
by pvaldes (Chaplain) on Dec 19, 2011 at 00:11 UTC | |
by Anonymous Monk on Dec 20, 2011 at 14:49 UTC | |
by ww (Archbishop) on Dec 20, 2011 at 17:18 UTC |