stefankueng / grepWin

A powerful and fast search tool using regular expressions
https://tools.stefankueng.com/grepWin.html
GNU General Public License v3.0
1.74k stars 180 forks source link

Multi-line search doesn't convert regex special chars #397

Closed Coldblackice closed 1 year ago

Coldblackice commented 1 year ago

When pasting a multi-line search, grepWin automatically applies the necessary newline/spacing chars. However, it doesn't escape special regex chars first, such as "(" and ")".

Apologies if this is intended.

stefankueng commented 1 year ago

Sorry, but there's no way to determine whether ( and ) need escaping or whether you intended them as proper regex chars, e.g. for capture groups. So what you ask for is not possible to implement without the ability of mind reading.

Nutzzz commented 1 year ago

While mind-reading sounds like a great feature... short of that, couldn't there be a right-click "Paste As Plain Text (Escaped)" action for the Search box (at least when in Regex mode), as well as the Exclude dirs box? I've wanted this feature as well.