简而言之,我试图在不触及周围文本的情况下使用包裹的xhtml标签来查找和替换文本。理想情况下,我会在记事本++使用正则表达式,但曾与正则表达式,并用PHP只有有限的经验没经验,使用正则表达式或php解析字符串
例如:
Year: 2007 Registration: XYZS23
Transmission: Auto Stock Number: AZ1234
Kilometres: 1280 Colour: Blue
Features:
includes cruise control.
与所解析的文本,然后它看起来像下面这样:
<strong>Year:</strong> 2007 <strong>Registration:</strong> XYZS23
<strong>Transmission:</strong> Auto <strong>Stock Number:</strong> AZ1234
<strong>Kilometres:</strong> 1280 <strong>Colour:</strong> Blue
<strong>Features:</strong>
includes cruise control.
所以任何建议将不胜感激。
对不起,是一个痛苦,但有没有办法中的记事本做++?我曾尝试使用正则表达式不带引号,但它做了文字替换:即。用替换每个发现$ 0 – gadgetguy 2010-11-22 16:06:15
尝试用`\ 0`代替。 – 2010-11-22 16:06:46