Posted by the ManGeek
Wednesday, July 13th 2005 11:42 pm CDT
I've been working on developing a regular expression to match URLs in blog entries, giving someone link formatting similar to how its done on Slashdot [slashdot.org].
As you can see above, the following regular expression is what produces that [slashdot.org] which follows:
/(<a .*?href="https?:\/\/(.*?)[\/\"].*?</a>)/\1 [\2]/
Improvements and recommendations are welcome. I can note right away that this is designed to do nothing to relative URLs.
Trackback URL: http://www.mangeek.com/blogc/27track.html
Posted by: ...
Monday, February 6th 2012 11:06 am CST
No comments on file...
This site and all its contents copyright © 2012 ManGeek, Inc. All rights reserved.
All quotations copyright © to their respective source.
