Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Grab 4 numbers from url

by NetWallah (Canon)
on May 01, 2016 at 20:38 UTC ( [id://1161986]=note: print w/replies, xml ) Need Help??


in reply to Grab 4 numbers from url

perl -wE 'my $url=q|http://test-text-ad-1234.html|; say $url=~/(\d{4}) +\.htm/i'

        This is not an optical illusion, it just looks like one.

Replies are listed 'Best First'.
Re^2: Grab 4 numbers from url
by htmanning (Friar) on May 01, 2016 at 21:36 UTC
    Perfect! Thank you.

Log In?
Username:
Password:

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

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

    No recent polls found