【发布时间】:2010-10-31 14:39:49
【问题描述】:
我需要删除链接中的第一个正斜杠,格式如下:
/directory/link.php
我需要:
directory/link.php
我不懂正则表达式(preg_replace?),那些斜线让我很生气..
我需要你的帮助!
非常感谢!
【问题讨论】:
-
了解 preg_replace 的最佳地点当然是php documentation,我建议您也检查一下general preg (pcre) documentation。
-
re 很好的学习资源 - 我通过使用 The Regex Coach 学到了很多东西:weitz.de/regex-coach(个人和商业用途免费)
标签: php regex preg-replace