Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: regex search for words with one digit

by tybalt89 (Monsignor)
on Sep 21, 2020 at 23:37 UTC ( [id://11122050]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $text = "John P5ete Andrew Richard58 Nic4k Le7on5";
    my @names = $text =~ /\b[^\W\d]*\d[^\W\d]*\b/g;
    print "@names\n";
    
  2. or download this
    P5ete Nic4k
    
  3. or download this
    my $text = "John P5ete Andrew Richard58 Nic4k Le7on5";
    my @names = $text =~ /[^\W\d]*\d[^\W\d]*/g;
    print "@names\n";
    
  4. or download this
    P5ete Richard5 8 Nic4k Le7on 5
    

Log In?
Username:
Password:

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

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

    No recent polls found