coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.22k stars 424 forks source link

Search reslults case change #1599

Closed Roccobot closed 3 months ago

Roccobot commented 3 months ago

Search/Replace dialog: I would love to have the \L, \l, \U and \u parameters/operators available in the replacement string. They are super useful to change the case of specific things.

For example, replacement string \l$1 would write the first RegEx captured group after converting the first letter to lowercase.

There's already an alternative, which is search a string → make a selection → use CotEditor command to change case. But it would be much comfortable if those functions were included in the Search/Replace box.

1024jp commented 3 months ago

The problem here is, the regex engine by ICU, which Apple's NSRegularExpression uses, does not support \L, \I, and \U things. I agree with you that your suggestion must be convenient, but because of this technical reason, we need to wait for the growth of regex engines on Swift/Apple platforms.

Roccobot commented 3 months ago

Thanks a lot anyway for taking in into consideration! 🙏🏻 Should I close this issue?

1024jp commented 3 months ago

Yes, because this case is the kind of thing that is waiting for upstream to support, which is a bit different from a list of things to do, it would be better just to close. Thank you.