I have the following piece of HTML I'm trying to run regex on with gregexpr function in R
<div class=g-unit>
<div class=nwp style=display:inline>
<input type=hidden name=cid value="22144">
<input autocomplete=off class=id-fromdate type=text size=10 name=startdate value="Sep 6, 2013"> -
<input autocomplete=off class=id-todate type=text size=10 name=enddate value="Sep 5, 2014">
<input id=hfs type=submit value=Update style="height:1.9em; margin:0 0 0 0.3em;">
</div>
</div>
</div>
<div id=prices class="gf-table-wrapper sfe-break-bottom-16">
<table class="gf-table historical_price">
<tr class=bb>
<th class="bb lm lft">Date
<th class="rgt bb">Open
<th class="rgt bb">High
<th class="rgt bb">Low
<th class="rgt bb">Close
<th class="rgt bb rm">Volume
<tr>
...
...
</table>
</div>
I am trying to extract the table part from this html by using the following regex expression
<table\\s+class="gf-table historical_price">.+<
When I run the gregexpr function with perl=FALSE it works fine and I get a result However if I run it with perl=TRUE I get back nothing. It doesn't seem to match it
Does anyone know why the results are different from just switching Perl on and off? Many thanks in advance!