Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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
Replies are listed 'Best First'.
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 rifling through the Monastery: (12)
As of 2015-07-28 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls