Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: regex search for words with one digit

by tybalt89 (Prior)
on Sep 21, 2020 at 17:22 UTC ( #11122013=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    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
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-04-21 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?