Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Extended Patterns of Regular Expressions

by OM_Zen (Scribe)
on Feb 19, 2003 at 22:47 UTC ( #236866=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $cust_code  = “SILICONEXSiliconex-wafers”;
    
    ...
    __END__
    [SILICONEXSiliconex-wafers]
    
  2. or download this
    
    my $pattern = "(?i)SILICONEXsiliconex-wafers";
    ...
    
                                 }
    
  3. or download this
    
    
    ...
         (?i) as /i for case sensitive pattern notation 
              or a combination of the flags
    
  4. or download this
    
    my $sub_contract="SILICONEXsiliconex-wafers ^M NOTE1-- a shipment in ^
    +M backlog calc note for 
    ...
    [ for 
    the shipping dates the contract is delivered ] [ 1 a shipment in  back
    +log calc note ]
    
  5. or download this
        s/(?m:(\^M|--))/ /g 
    
  6. or download this
    
    (?=     indicates a positive forward(look_ahead) assertion
    ...
    (?<=    indicates a positive backward(look_behind) assertion
    (?<!    indicates a negative backward(look_behind) assertion
    
  7. or download this
         $product = "MOTOROLAx|xx|xx|x01-01-1900x|xYx|x";
         $product =~ s/x\|xx\|x/x\|x x\|x/g;
    ...
    
         [ MOTOROLAx|x x|xx|x01-01-1900x|xYx|x ]
    
  8. or download this
     [ MOTOROLAx|x x|xx|x01-01-1900x|xYx|x ]
    
  9. or download this
    $product = "MOTOROLAx|xx|xx|x01-01-1900x|xYx|x";
    $product =~ s/(?<=\|)xx(?=\|)/x x/g;
    ...
    
    [ MOTOROLAx|x x|x x|x01-01-1900x|xYx|x ]
    
  10. or download this
    $product = "MOTOROLAx|xx|xx|x01-01-1900x|xYx|xx";
    $product =~ s/(?<=\|)xx(?=(\||$)/x x/g;
    ...
    
    
    [ MOTOROLAx|x x|x x|x01-01-1900x|xYx|x x ]
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-12-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (188 votes), past polls