Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: regexp - repeatedly delete words expressed in alternation from end of string

by ikegami (Pope)
on Nov 06, 2007 at 16:33 UTC ( #649253=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @words = qw( SA NV LTD CO LLC );
    
  2. or download this
    my ($re) = map qr/$_/i, join '|', map quotemeta, @words;
    
  3. or download this
    use Regexp::List qw( );
    my $re = Regexp::List->new(modifiers => 'i')->list2re(@words);
    
  4. or download this
    while (<>) {
       chomp;
    ...
    
       print("$_$/");
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2018-11-15 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (183 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!