|
Regular expression to shorten URL
Hello to all... I have a small code problem, looking for a regular expression that would shorten URL changed in links (ie. ht*p://www.ficgs.com/looooooooooooongurl.html would appear ht*p://www.ficgs.com/looo...url.html .. Here is my regular expression : $url = preg_replace("#([\n ])?([hftp]+)://([a-z0-9-=_%\#$~%&;?./]+)#i", '\1<a href="\2://\3" target="_blank">\2://\3</a>', $url); Thanks in advance :) ficgs Suggestions ficgs More websites You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles. admin Other websites The following links might be less relevant, please change their ranks if you find them useful. ![]() ![]() corz > serv/tricks/htaccess2.php
![]() ![]() codex.gallery2 > Gallery2:URL Rewrite (optional) Gallery URLs whose parameters are a superset of match are... can only filter based on request URL parameters, you have access to... ![]() ![]() wareseeker > free short url redirect var pageOptions = { 'pubId' : 'pub-8098918000470057', 'channel' :... - Accounts that are inactive are automatically deleted - Simple... ![]() ![]() yourhtmlsource > sitemanagement/urlrewriting ![]() ![]() web wise wizard > javascript tutorials/javascript ![]() ![]() regular expressions Compose and analyze regex patterns with RegexBuddy's easy-to-grasp... Page last updated: 17 June 2009 Site last updated: 22 September... ![]() ![]() paulsonny > ?p=18 ![]() ![]() vogella > articles/Java ![]() ![]() database geek > 2009/04/11/ora tweet now does short urls ![]() ![]() community.nstalker > twitterfox weird behavior Serving Web Application security community since... ![]() ![]() chazzuka > blog/?p=193 45+ Best free PHP classes and libraries for Faster Development |... 45 + Best free PHP classes and libraries for faster development |... ![]() ![]() esev > blog/review/host your own url shortener 10 php apps reviewed TekSavvy and SpeakOut: My Alternatives to Rogers and... ![]() ![]() answers.oreilly > topic/280 how to validate urls with How to find a match within another match in a regular... O'Reilly Answers is a community site for sharing knowledge, asking... Redeem the reputation points you've earned from participating in... There's no trackback at the moment.
[Games online]
[Last topics]
[Glossary]
[Help]
[Membership]
[About]
[Social network] [Hot news] [Discussions] [Seo forums] [Meet people] [Directory] |