I am working in Ruby on Rails application, How can I remove specific html tag with some attribute as shown as below :-
post = Post.find(1646).content
=> "<p>this is just another update</p><p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"any href link" title=\"xyz\">remove it</a></p>"
I have to totally remove this below paragraph from above content:-
<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"any href link" title=\"xyz\">remove it</a></p>
How can I identify this <p data-f-id=\"pbf\"
with using regex or something else. Any help would be appreciated. :)