Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-09-20 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (170 votes). Check out past polls.

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