Skip to content
Daniel Pope edited this page Jul 23, 2015 · 1 revision

For the NRCC message bug #26

Find a regex that filters all HTML tags but <a href="...">, </a>

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="apple-touch-icon" sizes="72x72" href="/WAT/apple-touch-icon-72x72.png"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><title>trntxt: WAT</title><style>body{font-family:sans-serif;color:#333;max-width:600px;padding:5px;margin:auto}.error{color:red}hr.divider{width:40%}hr{border-style:solid;border-top:0;border-color:#ccc}</style></head><body><p><em>trntxt.uk</em></p><strong>Departure board for London Waterloo (WAT)</strong><p class="error">NRCC message: <P>Journeys to and from London Waterloo are being disrupted. More information can be found in <A href="http://nationalrail.co.uk/service_disruptions/103677.aspx">latest travel news.</A>&nbsp;</P></p><br><br><hr><br><strong>Train services</strong><br><br>London Waterloo &gt; <strong>Gillingham (Dorset)</strong><br>Departs London Waterloo at <strong>15:50 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Reading</strong><br>Departs London Waterloo at <strong>15:50 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Woking</strong><br>Departs London Waterloo at <strong>15:50 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Weybridge</strong><br>Departs London Waterloo at <strong>15:52 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Alton</strong><br>Departs London Waterloo at <strong>15:53 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Dorking</strong><br>Departs London Waterloo at <strong>15:54 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>London Waterloo</strong><br>Departs London Waterloo at <strong>15:57 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Windsor &amp; Eton Riverside</strong><br>Departs London Waterloo at <strong><del>15:58</del> (Cancelled)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Portsmouth Harbour</strong><br>Departs London Waterloo at <strong>16:00 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br>London Waterloo &gt; <strong>Raynes Park</strong><br>Departs London Waterloo at <strong>16:01 (On time)</strong>, <small>no platform information available</small><br><br><hr class="divider"><br><br><hr><p><small><a href="/">How to use trntxt</a></small></p><p><small>An <a href="https://github.com/danielthepope/trntxt">open source project</a> created by <a href="https://twitter.com/danielthepope">@danielthepope</a></small></p><p><small>Powered by <a href="http://www.nationalrail.co.uk/">National Rail Enquiries</a></small></p></body></html>
Clone this wiki locally