View Single Post
Old 01-25-2023, 03:51 PM   #8
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 784
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
I'm going to go the easy route and not bother putting an OR inside the search. I'll just have two different searches for this. The first will be what I did, above, for non-self-terminated tags. This is the search string for the self-terminated tags:
Code:
(\b\w+?)(<[^/]+?/>)(\w+?\b)
The replacement string is the same for both cases:
Code:
\1\3\2
@j.p.s moving the initial word fragment to after the tag uses the same search strings as above. The difference would be the replace string:
Code:
\2\1\3
enuddleyarbl is offline   Reply With Quote