package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)<table.*?>(([\s*].*(\s*))+)?<\/table>`)
var str = `<h3>Disabilities Reported</h3>
<p><img src="https://chart.apis.google.com/chart?chtt=Disabilities Reported&chs=500x200&chco=76A4FB,224499,FF0000,80C65A,00FF00,FFC020&chxt=x,y&chxl=0:||1:|0%|25%|50%|75%|100%&cht=bvg&chd=t:80|16|1|4|1|5&chdl=Blindness - 80%|Low Vision/Visually-Impaired - 16%|Cognitive - 1%|Deafness/Hard-of-Hearing - 4%|Motor - 2%|No disability - 5%&chbh=30" alt="Disabilities Reported"/></p>
<div style="width:100%;">
<table style="width:90%;text-align:left;">
<caption>Which of the following disabilities do you have?</caption>
<tr><th>Response</th><th># of Respondents</th><th>% of Respondents</th></tr>
<tr><td>Blindness</td><td>898</td><td>80.1%</td></tr>
<tr><td>Low Vision/Visually-Impaired</td><td>177</td><td>15.8%</td></tr>
<tr><td>Cognitive</td><td>8</td><td>.7%</td></tr>
<tr><td>Deafness/Hard-of-Hearing</td><td>47</td><td>4.2%</td></tr>
<tr><td>Motor</td><td>24</td><td>2.1%</td></tr>
<tr><td>No disability</td><td>60</td><td>5.4%</td></tr>
</table>
</div>
<p>Users could select multiple options. 118 respondents (10.4%) reported multiple disabilities. 52 (4.6%) reported blindness and low vision/visually impaired. 33 respondents (2.9%) reported being both deaf and blind.</p>
<h3>Computer and Screen Reader Proficiency</h3>
<p><img alt='Pie Chart of Computer Proficiency' src='https://chart.apis.google.com/chart?chxt=x,y&chtt=Computer Proficiency&cht=p3&chl=Expert|Advanced|Intermediate|Beginner&chs=500x200&chd=t:22,44,27,8'></p>
<div style="width:100%;">
<table style="width:70%;text-align:left;">
<caption>Please rate your computer proficiency</caption>
<tr><th>Response</th><th>% of Respondents</th></tr>
<tr><td>Expert</td><td>22%</td></tr>
<tr><td>Advanced</td><td>44%</td></tr>
<tr><td>Intermediate</td><td>27%</td></tr>
<tr><td>Beginner</td><td>8%</td></tr>
</table>
</div>
<p><img alt='Pie Chart of Screen Reader Proficiency' src='https://chart.apis.google.com/chart?chxt=x,y&chtt=Screen Reader Proficiency&cht=p3&chl=Expert|Advanced|Intermediate|Beginner&chs=500x200&chd=t:17,41,32,9'></p>
<div style="width:100%;">
<table style="width:70%;text-align:left;">
<caption>Please rate your screen reader proficiency</caption>
<tr><th>Response</th><th>% of Respondents</th></tr>
<tr><td>Expert</td><td>17%</td></tr>
<tr><td>Advanced</td><td>41%</td></tr>
<tr><td>Intermediate</td><td>32%</td></tr>
<tr><td>Beginner</td><td>9%</td></tr>
</table>
</div>
<p>The responses for computer proficiency and screen reader proficiency were similar. Those who use screen readers for evaluation rated their screen reader proficiency much lower (80% chose Beginner or Intermediate) than those that always use screen readers (only 37% chose Beginner or Intermediate).</p>
<h3>Screen Reader Usage</h3>
<p><img src="https://chart.apis.google.com/chart?chtt=Screen reader types&chs=450x200&chco=76A4FB,224499,FF0000,80C65A&chxt=x,y&chxl=0:||1:|0%|25%|50%|75%|100%&cht=bvg&chd=t:74|23|8|6&chdl=JAWS - 74%|Window-Eyes - 23%|NVDA - 8%|VoiceOver - 6%&chbh=40" alt="Screen Reader Types"/></p>
<p>Of the 1121 respondents, 74% use JAWS, 23% use Window-Eyes, 8% use NVDA, and 6% use VoiceOver. While several other screen readers were reported, these were the most prominently reported. Individual versions of screen readers are not yet computed, but generally the majority of users are using the most up-to-date version of their screen reader.</p>
<h3 id="updates">Screen Reader Updates</h3>
<p><img alt='Screen Reader Updates' src='https://chart.apis.google.com/chart?chxt=x,y&chtt=Screen%20Reader%20Updates&cht=p3&chl=Immediately|First 6 months|6-12 months|1-2 years|2-3 years|3+ years|No response&chs=500x200&chd=t:41,25,9,9,4,6,6'></p>
<div style="width:100%;">
<table style="width:70%;text-align:left;">
<caption>How soon do you update your screen reader after a new version is released?</caption>
<tr><th>Upgrade Window</th><th>% of Respondents</th></tr>
<tr><td>Immediately</td><td>41%</td></tr>
<tr><td>First 6 months</td><td>25%</td></tr>
<tr><td>6-12 months</td><td>9%</td></tr>
<tr><td>1-2 years</td><td>9%</td></tr>
<tr><td>2-3 years</td><td>4%</td></tr>
<tr><td>3+ years</td><td>6%</td></tr>
<tr><td>No response</td><td>6%</td></tr>
</table>
</div>
<p>Most respondents update their screen reader version soon after a new version is released (74.6% within the first year). However, a significant number of users may still be using screen readers that are 3 years old or older.</p>
<h3>Screen Reader Customization</h3>
<p><img alt='Screen Reader Customization' src='https://chart.apis.google.com/chart?chxt=x,y&chtt=Screen%20Reader%20Customization&cht=p3&chl=A lot|Somewhat|Slightly|Not at all|No response&chs=500x200&chd=t:29,40,21,7,4'></p>
<div style="width:100%;">
<table style="width:70%;text-align:left;">
<caption>How customized are your screen reader settings? (e.g., changed verbosity, installed scripts, etc.)</caption>
<tr><th>Response</th><th>% of Respondents</th></tr>
<tr><td>A lot</td><td>29%</td></tr>
<tr><td>Somewhat</td><td>40%</td></tr>
<tr><td>Slightly</td><td>21%</td></tr>
<tr><td>Not at all</td><td>7%</td></tr>
<tr><td>No response</td><td>4%</td></tr>
</table>
</div>
<p>Most screen reader users customize their screen readers. Those that reported no disability are much less likely to customize their screen readers - a lot or some customization was reported by only 27.6% of respondents with no disability versus 71.4% for those that reported blindness.</p>
<h3>Hardware Devices</h3>
<p><img src="https://chart.apis.google.com/chart?chtt=Hardware Devices&chs=300x200&chco=76A4FB,80C65A,FF0000&chxt=x,y&chxl=0:||1:|0%|25%|50%|75%|100%&cht=bvg&chd=t:78|54|12&chdl=Desktop - 78%|Laptop - 54%|Mobile phone - 12%&chbh=40" alt="Hardware Devices"/></p>
<p>78% of respondents reported using a screen reader on a desktop computer, 54% use a screen reader on a laptop, and 12% use a screen reader on a mobile phone. While many respondents report using a BrailleNote, PacMate, PDA or other devices, the totals for these has not yet been calculated and are not included in the numbers reported above. No respondents who use screen readers for evaluation reported using a screen reader on a mobile device.</p>
<h3 id="browsers">Browsers</h3>
<p><img src="https://chart.apis.google.com/chart?chtt=Browsers used&chs=380x200&chco=76A4FB,224499,FF0000,80C65A,00FF00,FFC020&chxt=x,y&chxl=0:||1:|0%|25%|50%|75%|100%&cht=bvg&chd=t:33|68|2|39|6&chdl=IE6 - 33%|IE7 - 68%|IE8 - 2%|Firefox - 39%|Safari - 6%&chbh=40" alt="Graph of browsers used"/></p>
<div style="width:100%;">
<table style="width:70%;text-align:left;">
<caption>Which web browser(s) do you currently use with a screen reader?</caption>
<tr><th>Browser</th><th>% of Respondents</th></tr>
<tr><td>IE6</td><td>33%</td></tr>
<tr><td>IE7</td><td>68%</td></tr>
<tr><td>IE8</td><td>2%</td></tr>
<tr><td>Firefox</td><td>39%</td></tr>
<tr><td>Safari</td><td>6%</td></tr>
</table>
</div>
<p>Respondents with no disability were nearly twice as likely to list Firefox as blind respondents - 66% to 37%.</p>
<p><strong>Note:</strong> The survey question did not ask for the predominant browser used, but for any browsers used with a screen reader. IE8 and Safari numbers were from free-form responses (i.e., they were not listed as available options to select). The percentage of Safari users is over double that of the overall population - this may be due in part to the fact that some in the Mac community actively solicited survey participation and encouraged respondents to indicate their Safari use, perhaps partially due to feeling snubbed because we didn't list them with IE and Firefox as direct choices.</p>
</div>`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/