本文介绍了Php正则表达与Strtolower帮助需要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! $ text ='嗨#How are you'; 我需要 $输出=你好< a href = / how > #How < / a > 我需要从$ text中提取Hashtag,然后将其替换为链接标签部分转换为小写并保留主题标签,因为它是 解决方案 text ='嗨#How are you'; 我需要 输出=你好< a href = / how > #How < / a > 我需要从 文本然后将其替换为带有标签部分转换为小写的链接并保留主题标签 $text = 'Hi #How are you';I need$Output = Hi <a href="/how">#How</a>I need to extract Hashtag from the $text and then replace it with a link with hashtag part converted to lowercase and leave hashtag as it is 解决方案 text = 'Hi #How are you';I needOutput = Hi <a href="/how">#How</a>I need to extract Hashtag from thetext and then replace it with a link with hashtag part converted to lowercase and leave hashtag as it is 这篇关于Php正则表达与Strtolower帮助需要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 20:11