Published
Edited
Sep 14, 2022
Insert cell
Insert cell
tr1 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Union Baptist Church</h4><br />
<b>AA IT WORKS II - AA It Works II</b><br />
240 West 145th Street,
<br />(Betw 7th & 8th Avenues) NY 10039
<br />
<br />
<div class="detailsBox">
Thu=Altern.BB, Living Sober & Other A.A. Literature. <br />Fri.=Alternates between Step & Tradition.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Wednesdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Thursdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> BB = Big Book meeting
<br />
<br />
<b>Fridays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Tuesdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=36" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr1.split('</td>')
Insert cell
metadata = tr1.split('</td>')[0]
Insert cell
metadata.split('</h4>')
Insert cell
metadata.search('detailsBox')
// output is 429 which is the number of characters that precede 'detailsBox', or the character number which 'detailsBox' begins
Insert cell
metadata.length
Insert cell
metadata.substring(429, 439)
// Plus out a selection of a string, using search and substring together ie. parse out the Address, from the larger string of Location
Insert cell
metadata.split('<b>')
Insert cell
metadata.split('<b>')[1]
Insert cell
metadata.split('<b>')[1].split('</b>')
Insert cell
metadata.split('<b>')[1].split('</b>')[0]
Insert cell
nameMeeting = metadata.split('<b>')[1].split('</b>')[0]
Insert cell
metadata.split('<h4 style="margin:0;padding:0;">')[1].split('</h4>')[0]
Insert cell
nameLocation = metadata.split('<h4 style="margin:0;padding:0;">')[1].split('</h4>')[0]
Insert cell
metadata.split('\t\t\t\t\t\t')[1].split(',')[0]
Insert cell
nameAddress = metadata.split('\t\t\t\t\t\t')[1].split(',')[0]
Insert cell
metadata.split('<br />')[3].split('\n')[0]
Insert cell
nameAddress2 = metadata.split('<br />')[3].split('\n')[0]
Insert cell
nameAddress2.split(' ')
Insert cell
array = []
Insert cell
array.push(nameAddress2)
Insert cell
array
Insert cell
metadata.split('\t')
Insert cell
metadata.split('\t')[31]
Insert cell
metadata.split('\t')[31].split('<br />')[1]
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more