find and replace Gemini copy/paste coding data-path-to-node
-
Hi,
Here’s the code that I copied from Google Gemini into WordPress.
As you can see, each <span data-path-to-node=“11,1,0,0”> is different.
I can easily find/replace <span data-path-to-node=> as that’s consistent, but the numbers are all different. How can I delete the entire <span> as it’s bloat?
<tr> <td width="25%"><span data-path-to-node="11,1,0,0"><b data-path-to-node="11,1,0,0" data-index-in-node="0">Identifiers</b> Name</span></td> <td width="25%"><span data-path-to-node="11,1,1,0">You</span></td> <td width="25%"><span data-path-to-node="11,1,2,0">Ads</span></td> <td width="25%"><span data-path-to-node="11,1,3,0">Service /span></td> </tr>Thanks
Omar -
@Omar-A ,
Search has a “regular expression” mode which will be able to search for anything matching a pattern. Since I assume you want to also delete the matching
</span>to go with it, then I believe a regex like the following will work:
FIND =<span data-path-to-node[^>]*>(.*?)</span>
REPLACE =$1
SEARCH MODE =Regular ExpressionThat worked on the first three spans in your example (and would’ve worked on the fourth if the final
/span>wasn’t missing the<)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login