Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: regexp: extracting info

by prasadbabu (Prior)
on Dec 23, 2005 at 14:43 UTC ( [id://518764]=note: print w/replies, xml ) Need Help??


in reply to regexp: extracting info

If i understood your question correctly, this will work. Recently Roy Johnson has explained about this in his tutorial Using Look-ahead and Look-behind which will help you to understand '?=' etc.

$str = 'abc dddd 10 '; ($number) = $str =~ /(\d+)\s*$/; print "$number";

Prasad

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found