Edit some code for a clickable hash to work as i wish.

Fullført Lagt ut 7 år siden Betales ved levering
Fullført Betales ved levering

Hi ,

i wish for someone to edit some code i have and make it work as i want right now the code is working on hashtags such as #example but if the hashtag starts with a number say #2006 or has a symbol in it like #hash_hash then it does not create the link clickable...

the current code is below i just need a simple edit in the preg_replace to make this work as i want..

function make_hash_clickable($text)

{

$text = preg_replace("/@([\p{L}]+[\p{N}]*)/u", '<a href="/link1/$1/">@$1</a> ', $text);

$text = preg_replace("/#([\p{L}]+[\p{N}]*)/u", '<a href="/link2/$1/">#$1</a> ',$text);

return $text;

}

PHP

Prosjekt-ID: #12179029

Om prosjektet

7 bud Eksternt prosjekt Aktiv 7 år siden

Tildelt til:

appsoulutionphp

Dear Client, Thanks for this opportunity. We have very strong experience in web development with PHP, especially in Wordpress,Joomla,Magento,OsCommerce,framework such as Codeigniter,Zend,Laravel,Cakephp and Yii ,websi Mer

$15 USD på 1 dag
(10 omtaler)
2.9

7 frilansere byr i gjennomsnitt $24 for denne jobben

cestis

Hi. I am very experienced PHP deveoper with great knowledge of regular expression. I can easily modify this code to work with hashtags starting with number or containing underscore character. Please message me. I ca Mer

$20 USD på 1 dag
(45 Omtaler)
5.1
ankurrpipaliya

hi there, I am experienced web developer can work on your code. I am expert in php. start chatting with me. thanks...

$25 USD på 1 dag
(3 Omtaler)
1.8
maheshinc

Hi I have been in this industry for 10 years and such jobs are my daily practice.I can assure you that if you work with me once, you will always work with me for these kind of projects.

$20 USD på 3 dager
(0 Omtaler)
0.0