Mohd-PH / RegexSearch

Firefox Extension (WebExtension) to Search in HTML using Regular Expression (REGEX)
https://addons.mozilla.org/en-US/firefox/addon/regexsearch/
MIT License
50 stars 8 forks source link

Searches HTML-code instead of page content in some cases #2

Closed AllanLRH closed 6 years ago

AllanLRH commented 6 years ago

I did this:

Head to https://en.wikipedia.org/wiki/%CA%BBOumuamua Regex: (orbit.*) Template: $1\n

Result:

orbit</span></span></span>" title="Osculating <span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>"><span class="regexSearchHighlighter" style="background-color:yellow;">Orbit</span>al characteristics</a> <sup id="cite_ref-jpldata_6-1" class="reference"><a href="#cite_note-jpldata-6">[6]</a></sup></th>
Orbit</span>al_eccentricity" title="<span class='regexSearchHighlighter' style='background-color:yellow;' >Orbit</span>al eccentricity">Eccentricity</a></th>
Orbit</span>al_speed" title="<span class='regexSearchHighlighter' style='background-color:yellow;' >Orbit</span>al speed"><span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span>al speed</a></div>
Orbit</span>al_inclination" title="<span class='regexSearchHighlighter' style='background-color:yellow;' >Orbit</span>al inclination">Inclination</a></th>
orbit</span>_intersection_distance" title="Minimum <span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span> intersection distance">MOID</a></th>
orbit</span>_intersection_distance" title="Minimum <span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span> intersection distance">MOID</a></th>
orbit</span> in 2022 and leave the <a href="/wiki/Oort_cloud" title="Oort cloud">Oort cloud</a> in roughly 20,000 years. The amount of time the object has been drifting among the stars in the <a href="/wiki/Galactic_disc" class="mw-redirect" title="Galactic disc">galactic disc</a> is unknown.</p>
Orbit</span>al_eccentricity" title="<span class='regexSearchHighlighter' style='background-color:yellow;' >Orbit</span>al eccentricity"><span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span>al eccentricity</a> is 1.20, the highest of any object yet observed in the Solar System.<sup id="cite_ref-jpldata_6-3" class="reference"><a href="#cite_note-jpldata-6">[6]</a></sup><sup id="cite_ref-pseudoMPEC_8-2" class="reference"><a href="#cite_note-pseudoMPEC-8">[7]</a></sup> The previous record holder was <a href="/wiki/C/1980_E1_(Bowell)" title="C/1980 E1 (Bowell)">C/1980 E1</a> with an outbound-<span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> eccentricity of 1.057.<sup id="cite_ref-JPL-ecc_19-0" class="reference"><a href="#cite_note-JPL-ecc-19">[17]</a></sup><sup id="cite_ref-orientation_20-0" class="reference"><a href="#cite_note-orientation-20">[18]</a></sup><sup id="cite_ref-21" class="reference"><a href="#cite_note-21">[n 3]</a></sup> The high eccentricity of ʻOumuamua's <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> both inbound and outbound indicates that it has never been gravitationally bound to the Solar System and is an interstellar object due to its high incoming velocity, which is faster than the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>'s <a href="/wiki/Escape_velocity" title="Escape velocity">escape velocity</a>. It is moving in the opposite direction to the <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span>s of the planets, at an inclination to the <a href="/wiki/Ecliptic" title="Ecliptic">ecliptic</a> of about 60 degrees. The direction of motion<sup id="cite_ref-Hein2017_22-0" class="reference"><a href="#cite_note-Hein2017-22">[19]</a></sup> of ʻOumuamua is 6° from the <a href="/wiki/Solar_apex" title="Solar apex">solar apex</a>.<sup id="cite_ref-skyandtelescope_23-0" class="reference"><a href="#cite_note-skyandtelescope-23">[20]</a></sup></p>
orbit</span> is almost impossible to achieve from within our Solar System.<sup id="cite_ref-Schneider2017a_40-1" class="reference"><a href="#cite_note-Schneider2017a-40">[32]</a></sup> It has a speed at infinity of 26.33&nbsp;km/s (58,900&nbsp;mph) relative to the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span> when in interstellar space, and as the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span> pulled it inward the speed peaked at 87.71&nbsp;km/s (196,200&nbsp;mph) at <a href="/wiki/Perihelion" class="mw-redirect" title="Perihelion">perihelion</a> on 9 September 2017.<sup id="cite_ref-pseudoMPEC_8-4" class="reference"><a href="#cite_note-pseudoMPEC-8">[7]</a></sup><sup id="cite_ref-41" class="reference"><a href="#cite_note-41">[n 9]</a></sup></p>
orbit</span> backward, the asteroid is calculated to have gone through <a href="/wiki/Perihelion" class="mw-redirect" title="Perihelion">perihelion</a> on 9 September 2017, when it was 0.255&nbsp;<a href="/wiki/Astronomical_unit" title="Astronomical unit">AU</a> (38,100,000&nbsp;<a href="/wiki/Kilometre" title="Kilometre">km</a>; 23,700,000&nbsp;<a href="/wiki/Mile" title="Mile">mi</a>) from the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>, i.e., about 17% closer than <a href="/wiki/Mercury_(planet)" title="Mercury (planet)">Mercury</a>'s closest approach to the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>. While leaving the Solar System it passed approximately 0.1616&nbsp;<a href="/wiki/Astronomical_unit" title="Astronomical unit">AU</a> (24,180,000&nbsp;<a href="/wiki/Kilometre" title="Kilometre">km</a>; 15,020,000&nbsp;<a href="/wiki/Mile" title="Mile">mi</a>) from Earth on 14 October 2017.<sup id="cite_ref-jpldata_6-4" class="reference"><a href="#cite_note-jpldata-6">[6]</a></sup> The object is small and faint, and by the end of October had already faded to <a href="/wiki/Apparent_magnitude" title="Apparent magnitude">apparent magnitude</a> ~23.<sup id="cite_ref-MPC-object_32-1" class="reference"><a href="#cite_note-MPC-object-32">[28]</a></sup></p>
orbit</span> in May 2018, Saturn's <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> in January 2019, and Neptune's <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> in 2022.<sup id="cite_ref-NASA-FAQ_38-2" class="reference"><a href="#cite_note-NASA-FAQ-38">[30]</a></sup> As it leaves the Solar System, it will be approximately <a href="/wiki/Right_ascension" title="Right ascension">R.A.</a> 23h51m and <a href="/wiki/Declination" title="Declination">declination</a> +24°45', in <a href="/wiki/Pegasus_(constellation)" title="Pegasus (constellation)">Pegasus</a>.<sup id="cite_ref-pseudoMPEC_8-7" class="reference"><a href="#cite_note-pseudoMPEC-8">[7]</a></sup> It will take the object roughly 20,000 years to leave the Solar System,<sup id="cite_ref-44" class="reference"><a href="#cite_note-44">[n 11]</a></sup> given that the <a href="/wiki/Oort_cloud" title="Oort cloud">Oort cloud</a> is the furthest reaches of the Solar System.</p>
orbit</span>.<sup id="cite_ref-Discovery_3-2" class="reference"><a href="#cite_note-Discovery-3">[3]</a></sup> In an attempt to confirm any cometary activity, very deep <a href="/wiki/Shift-and-add" title="Shift-and-add">stacked images</a> were taken at the <a href="/wiki/Very_Large_Telescope" title="Very Large Telescope">Very Large Telescope</a> (VLT) later the same day, but the object showed no presence of a <a href="/wiki/Coma_(cometary)" title="Coma (cometary)">coma</a>.<sup id="cite_ref-49" class="reference"><a href="#cite_note-49">[n 13]</a></sup> Accordingly, it was renamed A/2017 U1, becoming the first comet ever to be <a href="/wiki/Naming_of_comets#Current_system" title="Naming of comets">re-designated as an asteroid</a>.<sup id="cite_ref-A2017U1_5-1" class="reference"><a href="#cite_note-A2017U1-5">[5]</a></sup></p>
orbit</span> or land on the asteroid and would simply fly past it, moving at many asteroid diameters per second. The authors conclude that, although challenging, an encounter mission would be feasible using near-term technology. That said, astronomers estimate that interstellar objects similar to 'Oumuamua pass inside the <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> of the Earth several times per year, thus providing possible opportunities for study whatever the given logistics of space travel.<sup id="cite_ref-Chasing_.E2.80.98Oumuamua_54-0" class="reference"><a href="#cite_note-Chasing_.E2.80.98Oumuamua-54">[41]</a></sup></p>
orbit</span>-Oct25_2017.png" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/48/A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png/321px-A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/48/A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png/481px-A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/48/A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png/641px-A2017_U1_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>-Oct25_2017.png 2x" data-file-width="1900" data-file-height="1068" height="120" width="214"></a></div>
orbit</span> of ʻOumuamua through the inner Solar System, with position on 25 October 2017</p>
orbit</span>s have negative semimajor axis, giving them a positive <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span>al energy.</span></li>
orbit</span> got its high eccentricity due to a close encounter with <a href="/wiki/Jupiter" title="Jupiter">Jupiter</a>. Its inbound-<span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span> eccentricity was less than 1.</span></li>
orbit</span> (1 AU from the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>) is <a rel="nofollow" class="external text" href="https://www.quora.com/What-is-the-escape-velocity-from-the-<span class='regexSearchHighlighter' style='background-color:yellow;' >sun</span>-And-from-the-solar-system">42.1 km/s</a>. For comparison, even <a href="/wiki/1P/Halley" class="mw-redirect" title="1P/Halley">1P/Halley</a> moves at 41.5 km/s when 1 AU from the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>, according to the formula <i>v</i> = 42.1219 <span class="nowrap">√<span style="border-top:1px solid; padding:0 0.1em;">1/<i>r</i> − 0.5/<i>a</i></span></span>, where <i>r</i> is the distance from the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span>, and <i>a</i> is the major semi-axis. Near-Earth asteroid <a href="/wiki/2062_Aten" title="2062 Aten">2062 Aten</a> only moves at 29 km/s when 1 AU from the <span class="regexSearchHighlighter" style="background-color:yellow;">Sun</span> because of the much smaller major semi-axis.</span></li>
Orbit</span>s computed with only a handful of observations can be unreliable. Short arcs can result in computer generated <span class="regexSearchHighlighter" style="background-color:yellow;">orbit</span>s rejecting some data unnecessarily.</span></li>
orbit</span>al solutions show <a rel="nofollow" class="external text" href="https://groups.yahoo.com/neo/groups/mpml/conversations/messages/33402">C/2008 J4 entering the Solar System @ 3.5 ± 1.3 km/s.</a> JPL #10 shows that on 1855-Mar-24 C/2008 J4 was moving 4.88 ± 1.8 km/s.</span></li>
orbit</span>.</span></li>
Orbit</span>al elements)</a></span></li>
orbit</span>_class;.cgifields=table_format;.cgifields=obj_kind;.cgifields=obj_group;.cgifields=obj_numbered;.cgifields=com_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>_class&amp;query=1&amp;c_sort=BgD">"JPL Small-Body Database Search Engine: e &gt; 1"</a>. <a href="/wiki/JPL_Small-Body_Database" title="JPL Small-Body Database">JPL Small-Body Database</a><span class="reference-accessdate">. Retrieved <span class="nowrap">26 October</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=JPL+Small-Body+Database+Search+Engine%3A+e+%3E+1&amp;rft.pub=JPL+Small-Body+Database&amp;rft_id=http%3A%2F%2Fssd.jpl.nasa.gov%2Fsbdb_query.cgi%3Fobj_group%3Dall%3Bobj_kind%3Dall%3Bobj_numbered%3Dall%3BOBJ_field%3D0%3BORB_field%3D0%3Bc1_group%3DORB%3Bc1_item%3DBg%3Bc1_op%3D%253E%3Bc1_value%3D1%3Btable_format%3DHTML%3Bmax_rows%3D50%3Bformat_option%3Dcomp%3Bc_fields%3DAcBhBgBjBiCk%3B.cgifields%3Dformat_option%3B.cgifields%3Dast_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>_class%3B.cgifields%3Dtable_format%3B.cgifields%3Dobj_kind%3B.cgifields%3Dobj_group%3B.cgifields%3Dobj_numbered%3B.cgifields%3Dcom_<span class='regexSearchHighlighter' style='background-color:yellow;' >orbit</span>_class%26query%3D1%26c_sort%3DBgD&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3A%CA%BBOumuamua" class="Z3988"><span style="display:none;">&nbsp;</span></span></span></li>
Orbit</span>"</a>. <i><a href="/wiki/Minor_Planet_Center" title="Minor Planet Center">Minor Planet Center</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">9 November</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Minor+Planet+Center&amp;rft.atitle=1I%2F%27Oumuamua+%3D+A%2F2017+U1+<span class='regexSearchHighlighter' style='background-color:yellow;' >Orbit</span>&amp;rft_id=http%3A%2F%2Fwww.minorplanetcenter.net%2Fdb_search%2Fshow_object%3Fobject_id%3D1I&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3A%CA%BBOumuamua" class="Z3988"><span style="display:none;">&nbsp;</span></span></span></li>
Orbit</span> diagram</a>&nbsp;<b>·</b> <a rel="nofollow" class="external text" href="https://ssd.jpl.nasa.gov/sbdb.cgi?sstr=3788040#elem"><span class="regexSearchHighlighter" style="background-color:yellow;">Orbit</span>al elements</a>&nbsp;<b>·</b> <a rel="nofollow" class="external text" href="https://ssd.jpl.nasa.gov/sbdb.cgi?sstr=3788040#phys_par">Physical parameters</a></li>
Mohd-PH commented 6 years ago

Thanks for sharing, going to add an option to ignore HTML tags

Mohd-PH commented 6 years ago

Okay @AllanLRH , here is the new version with ignoring HTML tags option Release Tried it in the page you provided and works fine. If you find something wrong please tell me

AllanLRH commented 6 years ago

Thanks, that seems to work :)