Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Remove URLs with regex_replace

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
blinks
Smarty Rookie


Joined: 30 Jun 2011
Posts: 6

PostPosted: Mon Aug 15, 2016 4:14 am    Post subject: Remove URLs with regex_replace Reply with quote

I'm looking to replace HTML code like this:

<a rel="license" href="http://creativecommons.org/publicdomain/mark/1.0/"><img src="http://i.creativecommons.org/p/mark/1.0/88x31.png" style="border-style: none;" alt="Public Domain Mark" /></a><br />This work is free of known copyright restrictions.

with just the href URL, viz:

http://creativecommons.org/publicdomain/mark/1.0

The actual URLs in the sample HTML will vary slightly.

Can anyone help? Thanks so much.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP