A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Languages
»
Perl
Author
Regular expression help
Nickolas Case
Ranch Hand
Joined: Apr 26, 2008
Posts: 98
posted
May 11, 2011 13:10:07
0
The following code returns all files from the directory. Why?
my $dirh = new DirHandle; opendir $dirh, $incomingDir; my @files = grep {"/^jmobs_\w+_ckgwc\.xml$/"} readdir $dirh; closedir $dirh;
James Sabre
Ranch Hand
Joined: Sep 07, 2004
Posts: 781
I like...
posted
May 11, 2011 15:00:17
0
Remove the quotes from round the regex.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
I agree. Here's the link:
http://aspose.com/file-tools
subject: Regular expression help
Similar Threads
Ant-junit batch test
viewable .jsp / .java source on my website
ant junit
secure my code
making source code viewable on my website
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter