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.
我想编写一个函数,它将 string1 作为输入,抓取两个参数之间的任何文本,操纵抓取的字符串,然后返回整个内容。
例如,假设我有这个:[Hi] 我的名字 [is] John。
我想要这个:
<a href='Hi'>Hi</a> my name <a href='is'>is</a> John.
preg_replace('/\[(.*?)\]/', '<a href="$1">$1</a>', $str);
It's not a massive deal but would like consistency across browsers and the document would be easier read if it fills the box. In Chrome, increasing the 'width' only incre