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

Re: Stripping links from field

by choroba (Cardinal)
on Oct 24, 2022 at 21:39 UTC ( [id://11147655]=note: print w/replies, xml ) Need Help??


in reply to Stripping links from field

Can you please update the post by including the link? It's not clear what you're trying to remove.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Stripping links from field
by htmanning (Friar) on Oct 24, 2022 at 22:21 UTC
    Sorry. I've updated my post. I'm trying to strip any URL but I posted a Google Drive URL as an example.
      Your regex seems to not catch links, but HTML tags with attributes. How do you define a "link"?

      Do you want to remove anything starting with http:// or https:// up to whitespace?

      s{https?://\S+}{}g

      Something else?

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        Yes, anything with http:// or https:// or even www. to whitespace.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found