Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

One regex construct to handle multiple string types

by neversaint (Deacon)
on Nov 29, 2008 at 07:21 UTC ( [id://726738]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str1 = "2L";       # want to capture 2L
    my $str2 = "bar.2L"; #want to capture 2L
    
  2. or download this
    while(<DATA>) {
        /\w*\.*(\S+)/; 
    ...
    __DATA__
    2L
    bar.2L
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://726738]
Approved by parv
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-23 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found