Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Collapsing a list of files...

by Anonymous Monk
on Sep 16, 2009 at 22:25 UTC ( #795723=note: print w/ replies, xml ) Need Help??


in reply to Collapsing a list of files...

Hmm, first try, Regex::PreSuf

#!/usr/bin/perl -- use Regex::PreSuf; print presuf(qw[ abcpwbln08 abcpwbln07 abcpwbnn10 abcpwbnn06 adesicln09 adesicln08 adesicln01 adesicnn05 ]); __END__ a(?:bcpwb(?:ln0[78]|nn(?:06|10))|desic(?:ln0[189]|nn05))
2nd try Regexp::Assemble
#!/usr/bin/perl -- use strict; use warnings; use Regexp::Assemble; my $ra = Regexp::Assemble->new; $ra->add( quotemeta $_) for qw[ abcpwbln08 abcpwbln07 abcpwbnn10 abcpwbnn06 adesicln09 adesicln08 adesicln01 adesicnn05 ]; print $ra->re; __END__ (?-xism:a(?:bcpwb(?:nn(?:06|10)|ln0[78])|desic(?:ln0[189]|nn05)))
3rd try Regexp::Assemble OR Regex::PreSuf site:perlmonks.org

4th maybe String::Glob::Permute


Comment on Re: Collapsing a list of files...
Select or Download Code
Re^2: Collapsing a list of files...
by ikegami (Pope) on Sep 17, 2009 at 15:21 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://795723]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-12-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls