in reply to RegEx Headaches
Yes, you answered the question correctly. Unfortunately, it was the wrong question. (That's my fault, not yours.)
I should have added: the filename can have _one or more_ digit groups separated by periods in the middle. I want to extract them ALL!
So, for example:
I thought the g would do that, but I guess not.
One way to do it.
DB<1> $_ = 'ActionLogs.188.8.131.52.184.108.40.206.9.xml'
DB<2> x split ' ', tr/.[a-zA-Z]/ /dr
Update: The brackets are unnecessary; tr/.a-zA-Z/ /dr works just as well.
Read a book on Perl
Written a book on Perl
Contributed to the Perl source code
Debugged someone else's script
Played Perl Golf
Used regular expressions to save the day
Used Perl for a certain amount of time (please specify)
Invested a certain amount of man-hours in learning Perl (please estimate)
Visited at least x Perl related events
(Co)maintain at least x active (up-river) CPAN modules
Forgotten you were not Larry Wall
One can never truly know Perl
Results (327 votes). Check out past polls.