View Single Post
Old 01-25-2023, 12:40 PM   #5
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,362
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by enuddleyarbl View Post
EDIT Again: Not Solved. The following removes the tags, but I actually want to move them. See later in the thread. Solved, I think. First, I had to change my search for split words to include self-terminated tags. Then I just had to group the bits of words found by the search string and concatenate them in the replace string:
Code:
SEARCH: (\w)<[^/].+?></.+?>(\w)|(\w)<[^/].+?/>(\w)
REPLACE: \1\2
At a quick glance (I haven’t tested and am responding from my phone) I would say you need to provide a capture for the id= portion as well if you want to just MOVE it. So the search/replace would look something like this:

Code:
SEARCH: (\w)(<[^/].+?></.+?>)(\w)|(\w)(<[^/].+?/>)(\w)
REPLACE: \2\1\3 -or- \1\3\2

Last edited by Turtle91; 01-25-2023 at 12:42 PM.
Turtle91 is offline   Reply With Quote