Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Collapsing a list of files...

by Anonymous Monk
on Sep 16, 2009 at 22:25 UTC ( [id://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

Replies are listed 'Best First'.
Re^2: Collapsing a list of files...
by ikegami (Patriarch) on Sep 17, 2009 at 15:21 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found