Bug 468452 - Feature Request: Enable Multiple String Search in Search and Replace Plug-in
Summary: Feature Request: Enable Multiple String Search in Search and Replace Plug-in
Status: REOPENED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-13 04:01 UTC by Sabri Ünal
Modified: 2023-04-13 17:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sabri Ünal 2023-04-13 04:01:19 UTC
Hi there,

I've been a long-time user of Kate and I've found its Search and Replace plug-in to be incredibly useful. It's a unique and powerful feature that has helped me out countless times.

Currently, I need to search for two specific strings in a folder. I'm looking for both the "Flip" string and its translation, "Çevir". The files I'm searching through must contain both of these strings.

Additionally, I also need to find files that contain the "Flip" string but not its translation, "Çevir". It's important that the files only have the "Flip" string and not the translated version.
Comment 1 Waqar Ahmed 2023-04-13 11:06:12 UTC
In Search&Replace, there's a button to filter through search results. So you can do something like:
- search for "abc" 
- results are displayed
- On the right side in the interface there is a filter button (hover over the button to see its tooltip)
- click the button => search line appears at the bottom
- Filter through the results using the search at the bottom
Comment 2 Sabri Ünal 2023-04-13 13:33:41 UTC
Hi Ahmed,

I know the filter action but it works differently.

You may think like a SQL query.

SELECT * FROM content` WHERE text LIKE "%flip%" and text like "%çevir%"; 

SELECT * FROM content` WHERE text LIKE "%flip%" and text not like "%çevir%"; 

If you think there is no use case for it, you can close the issue again.

Thanks.
Comment 3 Kåre Särs 2023-04-13 17:52:58 UTC
Hi,

I was going to say that this is a prime example for regular-expressions, but when trying to construct such, I notice a problem. ^ is beginning of line and $ is end of line and there is currently no way to specify a regular expression that specifies start of document and end of document. So in short is it a bit hard to get a regular expression the excludes a word from the whole document.

I was first thinking that \^ and \$ could be used for that, but that is needed for actual ^ and $. Ideas are well come. 
An ugly workaround would be to add an option to treat the whole document as one long string, in which case ^ would be start of document and $ end of document...