java


Regex Expression to find content between tags [closed]


I'm trying to get the content between
<td id="gmail-m_6864002552605404145api_Lastet_Response__c" style="border-radius:5px;border:1px solid rgb(216,221,230)">ALL CONTENT</td>
from the following html.
<div dir="ltr">
<br>
<div class="gmail_extra">
<br>
<div class="gmail_quote">
On 8 May 2017 at 09:03, Thiyagarajan Selvaraj <span dir="ltr"><thiyagarajan.selvaraj#xactium.com></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<header>
<img height="75px" id="gmail-m_6864002552605404145headerImage" width="125px">
<div style="width:100%;height:10px;background:rgb(117,177,222)"></div>
<br>
</header>
<div>
<div style="background-color:rgb(244,246,249);border-radius:0.25rem;margin:0.25rem 0px">
<h2 style="color:rgb(22,50,92);font-size:1rem;line-height:1rem;padding:0.5rem 0.75rem">
Information Section
</h2>
</div>
<table cellpadding="5px" cellspacing="5px" id="gmail-m_6864002552605404145infoTemplate" style="table-layout:fixed;width:100%;max-width:40rem">
<tbody>
<tr>
<td style="text-align:right">Risk</td>
<td><span id="gmail-m_6864002552605404145j_id0:emailTemplate:j_id3:j_id4:j_id7">Test Risk</span></td>
</tr>
<tr>
<td style="text-align:right">Target Completion Date</td>
<td><span id="gmail-m_6864002552605404145j_id0:emailTemplate:j_id3:j_id4:j_id9">05/05/2017</span></td>
</tr>
<tr>
<td style="text-align:right">Description</td>
<td><span id="gmail-m_6864002552605404145j_id0:emailTemplate:j_id3:j_id4:j_id11"></span></td>
</tr>
<tr>
<td style="text-align:right">Action Cost</td>
<td><span id="gmail-m_6864002552605404145j_id0:emailTemplate:j_id3:j_id4:j_id13">£1,200</span></td>
</tr>
</tbody>
</table>
<input type="hidden" value="a0Y0Y000005pHftUAE">
<br>
<div style="background-color:rgb(244,246,249);border-radius:0.25rem;margin:0.25rem 0px">
<h2 style="color:rgb(22,50,92);font-size:1rem;line-height:1rem;padding:0.5rem 0.75rem">
Response Section
</h2>
</div>
Please use the following template to reply to this email <br>
<table cellpadding="5px" cellspacing="5px" id="gmail-m_6864002552605404145replyTemplate" style="table-layout:fixed;width:100%;max-width:40rem">
<tbody>
<tr>
<td style="text-align:right;vertical-align:top">Action Owner Response</td>
<td id="gmail-m_6864002552605404145api_Lastet_Response__c" style="border-radius:5px;border:1px solid rgb(216,221,230)">
<p class="gmail-p1"><span class="gmail-s1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque a nisi nec risus auctor viverra quis blandit ipsum. Nullam at dolor ac mi efficitur auctor vitae a mi. Sed porttitor velit fringilla tincidunt auctor. Quisque at nisi et nulla elementum cursus. Praesent sagittis pellentesque urna, sit amet bibendum lectus porttitor id. Aliquam sed lacus ut augue euismod ornare. Cras vitae scelerisque lorem. Pellentesque nec pretium risus. Nullam vitae rutrum nulla, quis sagittis tellus. Donec eu lacus tincidunt, rhoncus mi vitae, molestie dui. Phasellus vitae tempus augue, quis pellentesque justo. Morbi vitae ipsum enim. Nullam ut urna in leo hendrerit congue. Pellentesque vel sagittis diam. Proin rutrum egestas volutpat. </span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">Fusce mollis vulputate pretium. Proin placerat auctor lacus. Morbi vitae mi porttitor, fringilla turpis nec, placerat est. Nunc a felis sit amet libero maximus blandit. Cras eleifend sollicitudin tellus, a commodo leo volutpat id. Etiam mollis erat vulputate eros bibendum, vel interdum quam pharetra. Suspendisse et dolor nunc. Nulla et viverra justo, non ultricies turpis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed scelerisque mi scelerisque diam sollicitudin porta. </span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">Donec finibus nulla at massa cursus congue. Etiam vulputate feugiat eleifend. Donec pulvinar eros fermentum nulla rutrum porttitor. Cras laoreet dolor sit amet nulla accumsan laoreet. Vestibulum in lectus elementum, suscipit quam vel, interdum nulla. Duis massa enim, eleifend ac turpis non, porttitor convallis nulla. Maecenas convallis magna massa, at varius purus fermentum eget. Duis sapien nunc, iaculis eget dui non, faucibus dictum tortor. Maecenas tincidunt orci a elit vehicula viverra. Phasellus sit amet metus augue. Pellentesque hendrerit elementum viverra. Praesent mattis id lorem quis pretium.</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<footer>
<br>
If the details in the form are left blank any existing data in those fields will be removed.
<br><br>
<div style="width:100%;height:10px;background:rgb(117,177,222)"></div>
</footer>
</blockquote>
</div>
<br><br clear="all">
<div><br></div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<b>Thiyagarajan Selvaraj <br></b>Senior Developer
<div>Xactium Limited</div>
<div>
<div>
<div><br></div>
Thiyagarajan.selvaraj#xactium.com<br>+44(0) 114 2505 315<span style="font-size:12pt"><br></span>Twitter | LinkedIn
</div>
<div><br></div>
</div>
<div><img src="https://xactiumltd--c.na19.content.force.com/servlet/servlet.ImageServer?id=01513000002nH3j&oid=00D300000008UJR" width="420" height="191"><br></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I'm using
<td[^>]*id="[^"]*api_([^"]*)"[^>]*>((.|\n|\r)+?)</\s*td>
regex to get the content out in http://www.regexplanet.com/advanced/java/index.html but it is not working as expected. please could someone assist to fix the regex.

Related Links

Repeat code in JSTL
Tracking down a 'GC overhead limit exceeded' error
Purpose of having custom annotations
Hide/show ImageView dynamically in getView
Main UI thread waits other thread's finish
From splash to the actual App. unfortunately APP has stopped
selectManyCheckbox: Action will not be invoked after converter [duplicate]
Strange “Resource leak: stream is never closed” with try-with-resources if Exception is thrown in a loop
Setting JAVA_OPTS in windows using command prompt
How to trigger an action when clicking a disabled JMenuItem?
How to create a jlist with images
Why “response.sendRedirect” doesn't work?
an animation causing out of memory exception
date validation not working in case of wrong year input
Cannot tell if my Servlet is being loaded by Tomcat under Eclipse
JDI - IllegalConnectorArgumentsException: Argument invalid

Categories

HOME
twitter
reserved
smarty
cplex
yahoo-oauth
fsm
django-imagekit
upload
virtualization
gnupg
fallback
flask-wtforms
percona
worldwind
windows-7-x64
pythonanywhere
text-rendering
introduction
swiftlint
bootstrap-tour
dxf
cas
wpfdatagrid
maxmind
tinymce-4
yadcf
uisplitview
google-qpx-express-api
perlin-noise
android-kernel
ios5
dartium
serve
mixture-model
uft-api
splice
temporary-files
no-www
netcdf4
scorm
pnotify
recursive-datastructures
mako
iso8601
spring-mongodb
lync-client-sdk
specrun
grails-tomcat-plugin
gridpane
rotativa
whois
unity-networking
reactive-banana
collapse
jmeter-maven-plugin
atk4
coveralls
graph-api-explorer
clipperlib
rake-task
tween
clicktag
pick
xojo
responsive-slides
aapt
undefined-reference
app42
viadeo
html5-notifications
jsctypes
dir
dbconnection
android-hardware
kyotocabinet
free-variable
angularjs-controller
mhtml
broken-links
labwindows
online-compilation
visitor-statistic
sortable-tables
web-application-design
getresponsestream
meego
memory-size
swing-app-framework
eqatec
defensive-programming
rtml

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile