johngodley / search-regex

Search Regex adds a powerful set of search and replace functions to WordPress that go beyond the standard searching capabilities, with full regex support.
https://searchregex.com
GNU General Public License v3.0
32 stars 9 forks source link

Replace Match with EMPTY Text #162

Closed dbareis closed 1 year ago

dbareis commented 1 year ago

It is not clear what "remove" (or "Multi" for that matter) does for replacement text and the small FAQ doesn't say. I was too scared to use it so I made the replacement text a single space (a non perfect solution). I do not want to remove any database entries, I just want text replacement.

The "Replace All" button will not be ungreyed if the Replacement text is Empty (what I want to use as the replacement.

johngodley commented 1 year ago

Remove removes the text, multi is multiline.

Removing entire entries is made very explicit.

dbareis commented 1 year ago

A thinking person might ask themselves how explicit it actually is if someone needs to ask. If you don't want feedback just say so.

"Multiline" (& "single line") if specified would be more obvious, at least I could google that. So "remove" does remove the database entry? Then how does one replace the found text with an empty string?

johngodley commented 1 year ago

If you don't want feedback just say so.

I'm not sure why you added that, but ok.

Remove will remove the matched text. It comes under the Global Text Replace action. Selecting this changes disables the replace input. Picking 'multi' will immediately show a multiline input.

To delete an entry you use the Delete Matches action.