You need to sign in to do that
Don't have an account?
![Trif Cristian 7 Trif Cristian 7](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How can I remove HTML content attributes in Java/APEX?
I want to remove from my regex all content for my attributes. Below I have my regular expression and I want to happen is to, for example, I have this: style=" padding:0cm 0cm 0cm 0cm" this is an HTML attribute and I want to remove what's inside the "" which is the content. So from style="padding:0cm 0cm 0cm 0cm" I want to be only style=""; and also from
style="font-family:"Open Sans",sans serif;color:#444444" to be only style=""....Can I remove my attribute content with regexp?
regexpStart = '(?<=Name:<o:p></o:p></span></p>###LB###</td>###LB###<td style="padding:0cm 0cm 0cm 0cm">###LB##'; regexpStart += '#<p class="MsoNormal" style="line-height:18.0pt;mso-line- height-rule:exactly"><span style="fon'; regexpStart += 't-family:"Open Sans",sans serif;color:#444444">)'; regexpEnd = '(?=<o:p>)'; regexp = regexpStart + '.*?' + regexpEnd;
https://stackoverflow.com/questions/48251198/regex-pattern-to-replace-html-in-a-given-text-string
https://regexr.com/
https://www.regextester.com/1946