Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by ikegami (Patriarch)
on Nov 06, 2007 at 16:33 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649253]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-19 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found