从非格式化字符串中提取数据
我想提取某些部分并能够将其放入一个漂亮的电子表格格式中。重要的部分是地址、病房号、平方英尺和价格。我本来打算在 PHP(新手)中尝试一些非常复杂的东西,但我认为可能有一种更简单的方法。
数据如下:
243-467
1402 E. Mt. Pleasant Ave. 50th Ward approximately 1,416 sq. ft. more or less BRT# 502440300 Improvements: Residential Dwelling
JANET DENNIS C.P. October Term, 2007 No. 01082 $105,641.01 Morton R. Branzburg, Esq.
244-712A
5407 Chestnut St. - Premise A 60th Ward Apt 2-4 Unts 2 sty Masonry; Improvement Area 4,610 sq. ft. BRT# 603011200 Improvements: Residential Dwelling
ALEXANDER TALMADGE, JR. (WHO HAS 1/3 INTEREST), BERNADINE ABAD AND BERNARD BLAIR TALMADGE $32,153.00 Drew Salaman, Esq.
I want to extract certain parts and be able to put it into a nice spreadsheet format. The important parts are the address, ward number, square feet, and price. I was going to try something really complicated in PHP(novice), but thought there might be an easier way.
The data looks like this:
243-467
1402 E. Mt. Pleasant Ave. 50th Ward approximately 1,416 sq. ft. more or less BRT# 502440300 Improvements: Residential Dwelling
JANET DENNIS C.P. October Term, 2007 No. 01082 $105,641.01 Morton R. Branzburg, Esq.
244-712A
5407 Chestnut St. - Premise A 60th Ward Apt 2-4 Unts 2 sty Masonry; Improvement Area 4,610 sq. ft. BRT# 603011200 Improvements: Residential Dwelling
ALEXANDER TALMADGE, JR. (WHO HAS 1/3 INTEREST), BERNADINE ABAD AND BERNARD BLAIR TALMADGE $32,153.00 Drew Salaman, Esq.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
数据从哪里来?你能修改它的输出吗?如果是这样,请尝试输出 CSV 文本 (http://en.wikipedia.org/wiki/Comma-分隔值)。 Excel 将导入 CSV 文件。
Where does the data come from? Can you modify its output? If so, try outputting CSV text (http://en.wikipedia.org/wiki/Comma-separated_values). Excel will import CSV files.