Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-07-20 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (431 votes). Check out past polls.

    Notices?