【发布时间】:2010-09-14 04:38:21
【问题描述】:
这是一个mysql表字段的内容:
Flash LEDs: 0.5W
LED lamps: 5mm
Low Powers: 0.06W, 0.2W
Remarks(1): this is remark1
----------
Accessories: Light Engine
Lifestyle Lights: Ambion, Crane Fun
Office Lights: OL-Deluxe Series
Street Lights: Dolphin
Retrofits: SL-10A, SL-60A
Remarks(2): this is remark2
----------
Infrared Receiver Module: High Data Rate Short Burst
Optical Sensors: Ambient Light Sensor, Proximity Sensor, RGB Color Sensor
Photo Coupler: Transistor
Remarks(3): this is remark3
----------
Display: Dot Matrix
Remarks(4): this is remark4
现在,我想阅读备注并将它们存储在一个变量中。备注(1)、备注(2)等是固定的。 'this is remark1'等来自表单输入字段,因此很灵活。
基本上我需要的是:读取 'Remarks(1):' 和 '--------' 之间的所有内容并将其保存在变量中。
感谢您的帮助。
【问题讨论】:
-
这些注释总是跨越一行吗?
-
为什么需要这样做?数据可能应该存储在数据库中适当的表结构中。