Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
smarty中的正则表达式。我需要找到并替换所有不同于
src = "http://
我正在尝试使用该功能
regex_replace:'/src="http/':"src=\"{$pageUrl}"
有否定文本的迹象吗?
您可能需要负前瞻:
regex_replace:"/src=\"(?!http:\/\/).*?\"/":"src=\"{$pageUrl}\""