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

Re^4: words with numbers in them

by facebook (Initiate)
on Aug 01, 2018 at 14:09 UTC ( [id://1219650]=note: print w/replies, xml ) Need Help??


in reply to Re^3: words with numbers in them
in thread words with numbers in them

I am trying to understand your regex, but i cannot understand why it is :

$names =~ /(\S*\d\S*)/g )

in stead of:

$names =~ /(\S*\d+\S*)/g

So i changed it and it seems this also works, so which is it?

Replies are listed 'Best First'.
Re^5: words with numbers in them
by tybalt89 (Monsignor) on Aug 02, 2018 at 01:35 UTC

    Either, because anything matched by \d will also be matched by \S

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found