J
Joey Martin
Couple questions when parsing using replace.
I have the following text I am parsing:
$650
Number of Bedrooms 3
Air Conditioning? Yes
Original Ad SOUTH, 3BR, air, basement. $650. Call 278-4171.
First Appeared in the Newspaper
Thursday, October 30, 2003
$775
Number of Bedrooms 3
Number of Bathrooms 2
Type of Parking Garage
Street Address Cashel Ct
Original Ad . New 3BR,2BA, garage. $775. 229-6575
First Appeared in the Newspaper
Friday, October 31, 2003
Here is part of my code so far:
str=replace (s,"2003","<br><br><br>")
str=replace(str,"Number of Bedrooms","|")
str=replace(str,"Number of Bathrooms","|")
str=replace(str,"Original Ad","|")
str=replace(str,"Type of Parking Garage","")
str=replace(str,"Street Address","|")
str=replace(str,"First Appeared in the Newspaper","|")
My intentions are to be able to import this information into a database,
so I need to same number of fields.
All I care about is # of bedrooms, # of baths,rent.
If you look at the 1st entry, there is no NUMBER OF BATHROOMS. How can I
put a blank in there anyway? I am delimiting by the pipe.
Any help is appreciated.
I have the following text I am parsing:
$650
Number of Bedrooms 3
Air Conditioning? Yes
Original Ad SOUTH, 3BR, air, basement. $650. Call 278-4171.
First Appeared in the Newspaper
Thursday, October 30, 2003
$775
Number of Bedrooms 3
Number of Bathrooms 2
Type of Parking Garage
Street Address Cashel Ct
Original Ad . New 3BR,2BA, garage. $775. 229-6575
First Appeared in the Newspaper
Friday, October 31, 2003
Here is part of my code so far:
str=replace (s,"2003","<br><br><br>")
str=replace(str,"Number of Bedrooms","|")
str=replace(str,"Number of Bathrooms","|")
str=replace(str,"Original Ad","|")
str=replace(str,"Type of Parking Garage","")
str=replace(str,"Street Address","|")
str=replace(str,"First Appeared in the Newspaper","|")
My intentions are to be able to import this information into a database,
so I need to same number of fields.
All I care about is # of bedrooms, # of baths,rent.
If you look at the 1st entry, there is no NUMBER OF BATHROOMS. How can I
put a blank in there anyway? I am delimiting by the pipe.
Any help is appreciated.