<p>
This is sample text
<span
data-sheets-value="{"1":2,"2":"sample text"}"
data-sheets-userformat="{"2":769,"3":{"1":0},"11":3,"12":0}"
data-sheets-note="110/mo">
sample text
<a href="#" target="_blank" rel="noopener">
Sample Text
</a>
Sample Text
</span>
</p>
<p>
This is sample text.
</p>
<h2>This is sample text</h2>
The html contains several attributes that starts with 'data-sheets-'. For example: data-sheets-value, data-sheets-userformat, data-sheets-note and many more may be there.
I need to remove all the attributes that starts with 'data-sheets-' along with their values using jQuery from the html. I can't statically consider the presence of only 3 attributes that starts with 'data-sheets-' as there are many more.
removeAttr() of jQuery requires full attribute name. Please guide how can I remove all the attributes from the entire html page that starts with 'data-sheets-'. I mean I need something like removeAttr('data-sheets-*').
Please guide how can I achieve this using jQuery.