ADDITIONAL USAGE NOTES
-
Hopefully, these notes expand on the documentation page enough to be useful:
* “Replace” is really “Preview”, while “Replace and Save” makes changes.
* The buttons have “>>” at the end of the label, which is usually code for “this
item opens another dialog”. They don’t. They perform their stated actions.
So don’t press “Replace and Save” until you’re *sure*.* The screenshots indicate you can edit the replace-preview text, but that
doesn’t work. A post from 2 years ago it hasn’t worked for going back
3 years, at least. (So it would seem that development has ceased–but it’s
good enough, once you suss out regular expressions.)* That screenshot also shows View, Replace, Edit buttons on replacement text.
But now there are only view/edit buttons, and they apply to the entire post,* Clicking those buttons erase the current search, so open them in a new tab.
* The bottom row of checkboxes makes a regex search. In a standard regular
expression, any character but [\^$.|?*+() is supposed to be a literal, but
many non-alphanumeric characters are interpreted by the plugin as special
characters, including > and /. To prevent the resulting syntax errors, delimit
the search with the plugin’s @ characters at the start and end.* A good idiom to know is .*?, because that is a “less greedy” match that doesn’t
automatically match everything it possibly can on a line. It’s still a *bit*
greedy, though. When matching (href=”.*?”), the search matched:
href=”…” target=”
In other words, it didn’t stop at first quotation mark it found. (However, it did
keep from matching entirely unrelated text outside the anchor tag.)The solution, to get precisely the match I wanted, was (href=”[\S]*”), where
the [\S]* ensures that the matched string has no spaces.* After installation, the search is found at Tools > Search Regex
Final note:
I installed the plugin, even though it was untested on 4.73, because of the strong functionality, and for lack of any real alternatives. So far, so good. What it does *really well* is to show you what it finds, and what it will change. So all in all, I recommend it.
- The topic ‘ADDITIONAL USAGE NOTES’ is closed to new replies.